| /* |
| * Copyright (C) 2025 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| syntax = "proto2"; |
| |
| package android.os.statsd.desktopmode; |
| |
| option java_outer_classname = "DesktopModeEnums"; |
| option java_multiple_files = true; |
| |
| // The reason for entering desktopmode. |
| enum EnterReason { |
| UNKNOWN_ENTER = 0; |
| OVERVIEW = 1; |
| APP_HANDLE_DRAG = 2; |
| APP_HANDLE_MENU_BUTTON = 3; |
| APP_FREEFORM_INTENT = 4; // This covers intent based starts from app-shortcut, taskbar, keyboard shortcuts where we don't use any custom transition |
| KEYBOARD_SHORTCUT_ENTER = 5; |
| SCREEN_ON = 6; // desktop mode visible after screen turned on |
| OVERVIEW_TASK_MENU = 7; |
| ADB_COMMAND = 8; |
| RECENTS = 9; // This covers quick switch and enter empty desk from recents. |
| EXIT_PIP = 10; // Activity exiting PiP entering freeform. |
| DISPLAY_CONNECT = 11; |
| DESK_REPARENT = 12; |
| APP_SELF_REPOSITION = 13; |
| TASKBAR_ICON = 14; |
| TASK_LAUNCH = 15; |
| CLIENT_REQUEST_EXIT_FULLSCREEN = 16; // The activity requested to enter fullscreen. |
| } |
| |
| // The reason for exiting desktopmode. |
| enum ExitReason { |
| UNKNOWN_EXIT = 0; |
| DRAG_TO_EXIT = 1; |
| APP_HANDLE_MENU_BUTTON_EXIT = 2; |
| KEYBOARD_SHORTCUT_EXIT = 3; |
| RETURN_HOME_OR_OVERVIEW = 4; // user swiped up to go to overview, or home screen |
| TASK_FINISHED = 5; // the task finished or dismissed |
| SCREEN_OFF = 6; |
| TASK_MINIMIZED = 7; // the task gets minimized |
| TASK_MOVED_TO_BACK = 8; // The task moved to back due to back gesture or button. |
| DISPLAY_DISCONNECTED = 9; |
| FULLSCREEN_LAUNCH = 10; |
| ADB_COMMAND_EXIT = 11; |
| TASK_MOVED_FROM_DESK = 12; |
| RECENTS_DISMISS = 13; |
| ENTER_PIP = 14; |
| ENTER_BUBBLE = 15; |
| CLIENT_REQUEST_ENTER_FULLSCREEN = 16; // The activity requested to exit fullscreen. |
| } |
| |
| // The reason a task was focused |
| enum FocusReason { |
| // Unset means there is no focus reason (the task did not get focused) |
| UNSET_FOCUS = 0; |
| // Unknown means we don't know what caused the focus change |
| FOCUS_UNKNOWN = 1; |
| } |
| |
| // The kind of the app event. |
| enum TaskEvent { |
| UNKNOWN_TASK_EVENT = 0; |
| TASK_ADDED = 1; |
| TASK_REMOVED = 2; |
| TASK_INFO_CHANGED = 3; // covers both size and position changes of the app |
| TASK_INIT_STATSD = 4; // Used to initialise state field in statsd |
| } |
| |
| // The reason a task was minimized |
| enum MinimizeReason { |
| // Unset means the task did not get minimized |
| UNSET_MINIMIZE = 0; |
| MINIMIZE_TASK_LIMIT = 1; |
| MINIMIZE_BUTTON = 2; |
| MINIMIZE_KEY_GESTURE = 3; |
| MINIMIZE_MULTI_ACTIVITY_PIP = 4; |
| } |
| |
| // The reason a task was unminimized |
| enum UnminimizeReason { |
| // Unset means the task did not get minimized |
| UNSET_UNMINIMIZE = 0; |
| // Unknown means we don't know what caused the unminimize action |
| UNMINIMIZE_UNKNOWN = 1; |
| UNMINIMIZE_TASKBAR_TAP = 2; |
| UNMINIMIZE_ALT_TAB = 3; |
| UNMINIMIZE_TASK_LAUNCH = 4; |
| UNMINIMIZE_APP_HANDLE_MENU_BUTTON = 5; |
| UNMINIMIZE_TASKBAR_MANAGE_WINDOW = 6; |
| } |
| |
| // The trigger for task resize |
| enum ResizeTrigger { |
| UNKNOWN_RESIZE_TRIGGER = 0; |
| // Resize task from its corner bounds |
| CORNER_RESIZE_TRIGGER = 1; |
| // Resize task from its edges |
| EDGE_RESIZE_TRIGGER = 2; |
| // Resize two tiled apps simultaneously using the divider |
| TILING_DIVIDER_RESIZE_TRIGGER = 3; |
| // Resize task to fit the stable bounds by clicking on the maximize button |
| // on the app header |
| MAXIMIZE_BUTTON_RESIZE_TRIGGER = 4; |
| // Resize task to fit the stable bounds by double tapping the app header |
| DOUBLE_TAP_APP_HEADER_RESIZE_TRIGGER = 5; |
| // Snap a resizable task to the left half of the screen by dragging the task |
| // to the left |
| DRAG_LEFT_RESIZE_TRIGGER = 6; |
| // Snap a resizable task to the right half of the screen by dragging the |
| // task to the right |
| DRAG_RIGHT_RESIZE_TRIGGER = 7; |
| // Snap a resizable task to the left half of the screen by clicking on the |
| // snap left menu on the app header |
| SNAP_LEFT_MENU_RESIZE_TRIGGER = 8; |
| // Snap a resizable task to the right half of the screen by clicking on the |
| // snap right menu on the app header |
| SNAP_RIGHT_MENU_RESIZE_TRIGGER = 9; |
| // Resize task to fit stable bounds by clicking on the maximize menu that |
| // appears when the app header button is long pressed or hovered over |
| MAXIMIZE_MENU_RESIZE_TRIGGER = 10; |
| // Resize task to fit the stable bounds by dragging the task to the top of the |
| // screen |
| DRAG_TO_TOP_RESIZE_TRIGGER = 11; |
| } |
| |
| // The stage at which a task is being resized |
| enum ResizingStage { |
| UNKNOWN_RESIZING_STAGE = 0; |
| // Stage before the task was resized |
| START_RESIZING_STAGE = 1; |
| // Stage when task resize is complete |
| END_RESIZING_STAGE = 2; |
| } |
| |
| // The input method for resizing the task |
| enum InputMethod { |
| UNKNOWN_INPUT_METHOD = 0; |
| TOUCH_INPUT_METHOD = 1; |
| STYLUS_INPUT_METHOD = 2; |
| MOUSE_INPUT_METHOD = 3; |
| TOUCHPAD_INPUT_METHOD = 4; |
| // Only tiling and maximizing window actions have keyboard shortcuts |
| KEYBOARD_INPUT_METHOD = 5; |
| ACCESSIBILITY_INPUT_METHOD = 6; |
| } |