1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.view.inputmethod; 20 21option java_outer_classname = "ImeProtoEnums"; 22option java_multiple_files = true; 23 24// Reason for creating the IME request, 25// used by android/internal/inputmethod/SoftInputShowHideReason.java. 26enum SoftInputShowHideReasonEnum { 27 REASON_NOT_SET = 0; 28 REASON_SHOW_SOFT_INPUT = 1; 29 REASON_ATTACH_NEW_INPUT = 2; 30 REASON_SHOW_SOFT_INPUT_FROM_IME = 3; 31 REASON_HIDE_SOFT_INPUT = 4; 32 REASON_HIDE_SOFT_INPUT_FROM_IME = 5; 33 REASON_SHOW_AUTO_EDITOR_FORWARD_NAV = 6; 34 REASON_SHOW_STATE_VISIBLE_FORWARD_NAV = 7; 35 REASON_SHOW_STATE_ALWAYS_VISIBLE = 8; 36 REASON_SHOW_SETTINGS_ON_CHANGE = 9; 37 REASON_HIDE_SWITCH_USER = 10; 38 REASON_HIDE_INVALID_USER = 11; 39 REASON_HIDE_UNSPECIFIED_WINDOW = 12; 40 REASON_HIDE_STATE_HIDDEN_FORWARD_NAV = 13; 41 REASON_HIDE_ALWAYS_HIDDEN_STATE = 14; 42 REASON_HIDE_RESET_SHELL_COMMAND = 15; 43 REASON_HIDE_SETTINGS_ON_CHANGE = 16; 44 REASON_HIDE_POWER_BUTTON_GO_HOME = 17; 45 REASON_HIDE_DOCKED_STACK_ATTACHED = 18; 46 REASON_HIDE_RECENTS_ANIMATION = 19; 47 REASON_HIDE_BUBBLES = 20; 48 REASON_HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR = 21; 49 REASON_HIDE_REMOVE_CLIENT = 22; 50 REASON_SHOW_RESTORE_IME_VISIBILITY = 23; 51 REASON_SHOW_TOGGLE_SOFT_INPUT = 24; 52 REASON_HIDE_TOGGLE_SOFT_INPUT = 25; 53 REASON_SHOW_SOFT_INPUT_BY_INSETS_API = 26; 54 REASON_HIDE_DISPLAY_IME_POLICY_HIDE = 27; 55 REASON_HIDE_SOFT_INPUT_BY_INSETS_API = 28; 56 REASON_HIDE_SOFT_INPUT_BY_BACK_KEY = 29; 57 REASON_HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT = 30; 58 REASON_HIDE_SOFT_INPUT_EXTRACT_INPUT_CHANGED = 31; 59 REASON_HIDE_SOFT_INPUT_IMM_DEPRECATION = 32; 60 REASON_HIDE_WINDOW_GAINED_FOCUS_WITHOUT_EDITOR = 33; 61 REASON_SHOW_IME_SCREENSHOT_FROM_IMMS = 34; 62 REASON_REMOVE_IME_SCREENSHOT_FROM_IMMS = 35; 63 REASON_UPDATE_IME_PARENT_FROM_IMMS = 36; 64 REASON_HIDE_WHEN_INPUT_TARGET_INVISIBLE = 37; 65 REASON_HIDE_CLOSE_CURRENT_SESSION = 38; 66 REASON_HIDE_SOFT_INPUT_FROM_VIEW = 39; 67 REASON_SHOW_SOFT_INPUT_LEGACY_DIRECT = 40; 68 REASON_HIDE_SOFT_INPUT_LEGACY_DIRECT = 41; 69 REASON_SHOW_WINDOW_LEGACY_DIRECT = 42; 70 REASON_HIDE_WINDOW_LEGACY_DIRECT = 43; 71 REASON_RESET_NEW_CONFIGURATION = 44; 72 REASON_UPDATE_CANDIDATES_VIEW_VISIBILITY = 45; 73 REASON_CONTROLS_CHANGED = 46; 74 REASON_DISPLAY_CONFIGURATION_CHANGED = 47; 75 REASON_DISPLAY_INSETS_CHANGED = 48; 76 REASON_DISPLAY_CONTROLS_CHANGED = 49; 77 REASON_UNBIND_CURRENT_METHOD = 50; 78 REASON_HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED = 51; 79 REASON_HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL = 52; 80 REASON_SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT = 53; 81 REASON_SHOW_SOFT_INPUT_IMM_DEPRECATION = 54; 82 REASON_CONTROL_WINDOW_INSETS_ANIMATION = 55; 83 REASON_SHOW_INPUT_TARGET_CHANGED = 56; 84 REASON_HIDE_INPUT_TARGET_CHANGED = 57; 85 REASON_HIDE_WINDOW_LOST_FOCUS = 58; 86 REASON_IME_REQUESTED_CHANGED_LISTENER = 59; 87} 88 89// The type of the IME request, used by android/view/inputmethod/ImeTracker.java. 90enum ImeRequestTypeEnum { 91 // IME request type not set. 92 TYPE_NOT_SET = 0; 93 // IME show request type. 94 TYPE_SHOW = 1; 95 // IME hide request type. 96 TYPE_HIDE = 2; 97 // IME user-controlled animation request type. 98 TYPE_USER = 3; 99} 100 101// The status of the IME request, used by android/view/inputmethod/ImeTracker.java. 102enum ImeRequestStatusEnum { 103 // IME request status not set. 104 STATUS_NOT_SET = 0; 105 // IME request running. 106 STATUS_RUN = 1; 107 // IME request cancelled. 108 STATUS_CANCEL = 2; 109 // IME request failed. 110 STATUS_FAIL = 3; 111 // IME request succeeded. 112 STATUS_SUCCESS = 4; 113 // IME request timed out. 114 STATUS_TIMEOUT = 5; 115} 116 117// The origin of the IME request, used by android/view/inputmethod/ImeTracker.java. 118enum ImeRequestOriginEnum { 119 // IME request origin not set. 120 ORIGIN_NOT_SET = 0; 121 // The IME show request originated in the client. 122 ORIGIN_CLIENT_SHOW_SOFT_INPUT = 1 [deprecated = true]; 123 // The IME hide request originated in the client. 124 ORIGIN_CLIENT_HIDE_SOFT_INPUT = 2 [deprecated = true]; 125 // The IME show request originated in the server. 126 ORIGIN_SERVER_START_INPUT = 3 [deprecated = true]; 127 // The IME hide request originated in the server. 128 ORIGIN_SERVER_HIDE_INPUT = 4 [deprecated = true]; 129 // The IME request originated in the client. 130 ORIGIN_CLIENT = 5; 131 // The IME request originated in the server. 132 ORIGIN_SERVER = 6; 133 // The IME request originated in the IME. 134 ORIGIN_IME = 7; 135 // The IME request originated in the WindowManager Shell. 136 ORIGIN_WM_SHELL = 8; 137} 138 139enum ImeRequestPhaseEnum { 140 // IME request phase not set. 141 PHASE_NOT_SET = 0; 142 // The view that requested the IME has been served by the IMM. 143 PHASE_CLIENT_VIEW_SERVED = 1; 144 // The IME client that requested the IME has window manager focus. 145 PHASE_SERVER_CLIENT_KNOWN = 2; 146 // The IME client that requested the IME has IME focus. 147 PHASE_SERVER_CLIENT_FOCUSED = 3; 148 // The IME request complies with the current accessibility settings. 149 PHASE_SERVER_ACCESSIBILITY = 4; 150 // The server is ready to run third party code. 151 PHASE_SERVER_SYSTEM_READY = 5; 152 // Checked the implicit hide request against any explicit show requests. 153 PHASE_SERVER_HIDE_IMPLICIT = 6; 154 // Checked the not-always hide request against any forced show requests. 155 PHASE_SERVER_HIDE_NOT_ALWAYS = 7; 156 // The server is waiting for a connection to the IME. 157 PHASE_SERVER_WAIT_IME = 8; 158 // The server has a connection to the IME. 159 PHASE_SERVER_HAS_IME = 9; 160 // The server decided the IME should be hidden. 161 PHASE_SERVER_SHOULD_HIDE = 10; 162 // Reached the IME wrapper. 163 PHASE_IME_WRAPPER = 11; 164 // Dispatched from the IME wrapper to the IME. 165 PHASE_IME_WRAPPER_DISPATCH = 12; 166 // Reached the IME's showSoftInput method. 167 PHASE_IME_SHOW_SOFT_INPUT = 13; 168 // Reached the IME's hideSoftInput method. 169 PHASE_IME_HIDE_SOFT_INPUT = 14; 170 // The server decided the IME should be shown. 171 PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE = 15; 172 // Requested applying the IME visibility in the insets source consumer. 173 PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER = 16 [deprecated = true]; 174 // Applied the IME visibility. 175 PHASE_SERVER_APPLY_IME_VISIBILITY = 17; 176 // Started the show IME runner. 177 PHASE_WM_SHOW_IME_RUNNER = 18; 178 // Ready to show IME. 179 PHASE_WM_SHOW_IME_READY = 19; 180 // The Window Manager has a connection to the IME insets control target. 181 PHASE_WM_HAS_IME_INSETS_CONTROL_TARGET = 20; 182 // Reached the window insets control target's show insets method. 183 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_SHOW_INSETS = 21; 184 // Reached the window insets control target's hide insets method. 185 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_HIDE_INSETS = 22; 186 // Reached the remote insets control target's show insets method. 187 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_SHOW_INSETS = 23; 188 // Reached the remote insets control target's hide insets method. 189 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_HIDE_INSETS = 24; 190 // Reached the remote insets controller. 191 PHASE_WM_REMOTE_INSETS_CONTROLLER = 25; 192 // Created the IME window insets show animation. 193 PHASE_WM_ANIMATION_CREATE = 26; 194 // Started the IME window insets show animation. 195 PHASE_WM_ANIMATION_RUNNING = 27; 196 // Reached the client's show insets method. 197 PHASE_CLIENT_SHOW_INSETS = 28; 198 // Reached the client's hide insets method. 199 PHASE_CLIENT_HIDE_INSETS = 29; 200 // Handling the IME window insets show request. 201 PHASE_CLIENT_HANDLE_SHOW_INSETS = 30; 202 // Handling the IME window insets hide request. 203 PHASE_CLIENT_HANDLE_HIDE_INSETS = 31; 204 // Applied the IME window insets show animation. 205 PHASE_CLIENT_APPLY_ANIMATION = 32; 206 // Started the IME window insets show animation. 207 PHASE_CLIENT_CONTROL_ANIMATION = 33; 208 // Checked that the IME is controllable. 209 PHASE_CLIENT_DISABLED_USER_ANIMATION = 34 [deprecated = true]; 210 // Collecting insets source controls. 211 PHASE_CLIENT_COLLECT_SOURCE_CONTROLS = 35; 212 // Reached the insets source consumer's show request method. 213 PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW = 36; 214 // Reached input method manager's request IME show method. 215 PHASE_CLIENT_REQUEST_IME_SHOW = 37; 216 // Reached the insets source consumer's notify hidden method. 217 PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN = 38; 218 // Queued the IME window insets show animation. 219 PHASE_CLIENT_ANIMATION_RUNNING = 39; 220 // Cancelled the IME window insets show animation. 221 PHASE_CLIENT_ANIMATION_CANCEL = 40; 222 // Finished the IME window insets show animation. 223 PHASE_CLIENT_ANIMATION_FINISHED_SHOW = 41; 224 // Finished the IME window insets hide animation. 225 PHASE_CLIENT_ANIMATION_FINISHED_HIDE = 42; 226 // Aborted the request to show the IME post layout. 227 PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT = 43; 228 // Reached the IME's showWindow method. 229 PHASE_IME_SHOW_WINDOW = 44; 230 // Reached the IME's hideWindow method. 231 PHASE_IME_HIDE_WINDOW = 45; 232 // Reached the InputMethodPrivilegedOperations handler. 233 PHASE_IME_PRIVILEGED_OPERATIONS = 46; 234 // Checked that the calling IME is the currently active IME. 235 PHASE_SERVER_CURRENT_ACTIVE_IME = 47; 236 // Reporting the new requested visible types. 237 PHASE_CLIENT_REPORT_REQUESTED_VISIBLE_TYPES = 48; 238 // Setting the IME visibility for the RemoteInsetsControlTarget. 239 PHASE_WM_SET_REMOTE_TARGET_IME_VISIBILITY = 49; 240 // IME has no insets pending and is server visible. Notify about changed controls. 241 PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED = 50; 242 // Handling the dispatch of the IME visibility change. 243 PHASE_CLIENT_HANDLE_DISPATCH_IME_VISIBILITY_CHANGED = 51; 244 // Notifying that the IME visibility change. 245 PHASE_CLIENT_NOTIFY_IME_VISIBILITY_CHANGED = 52; 246 // Updating the requested visible types. 247 PHASE_CLIENT_UPDATE_REQUESTED_VISIBLE_TYPES = 53; 248 // Reached the remote insets control target's setImeInputTargetRequestedVisibility method. 249 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_SET_REQUESTED_VISIBILITY = 54; 250 // Received a new insets source control with a leash. 251 PHASE_WM_GET_CONTROL_WITH_LEASH = 55; 252 // Updating the requested visible types in the WindowState and sending them to state controller. 253 PHASE_WM_UPDATE_REQUESTED_VISIBLE_TYPES = 56; 254 // Setting the requested IME visibility of a window. 255 PHASE_SERVER_SET_VISIBILITY_ON_FOCUSED_WINDOW = 57; 256 // Reached the redirect of InputMethodManager to InsetsController show/hide. 257 PHASE_CLIENT_HANDLE_SET_IME_VISIBILITY = 58; 258 // Reached the InputMethodManager Handler call to send the visibility. 259 PHASE_CLIENT_SET_IME_VISIBILITY = 59; 260 // Calling into the listener to show/hide the IME from the ImeInsetsSourceProvider. 261 PHASE_WM_DISPATCH_IME_REQUESTED_CHANGED = 60; 262 // An ongoing user animation will not be interrupted by a IMM#showSoftInput. 263 PHASE_CLIENT_NO_ONGOING_USER_ANIMATION = 61; 264 // Dispatching the token to the ImeInsetsSourceProvider. 265 PHASE_WM_NOTIFY_IME_VISIBILITY_CHANGED_FROM_CLIENT = 62; 266 // Now posting the IME visibility to the WMS handler. 267 PHASE_WM_POSTING_CHANGED_IME_VISIBILITY = 63; 268 // Inside the WMS handler calling into the listener that calls into IMMS show/hide. 269 PHASE_WM_INVOKING_IME_REQUESTED_LISTENER = 64; 270 // IME is requested to be hidden, but already hidden. Don't hide to avoid another animation. 271 PHASE_CLIENT_ALREADY_HIDDEN = 65; 272 // The view's handler is needed to check if we're running on a different thread. We can't 273 // continue without. 274 PHASE_CLIENT_VIEW_HANDLER_AVAILABLE = 66; 275 // ImeInsetsSourceProvider sets the reported visibility of the caller/client window (either the 276 // app or the RemoteInsetsControlTarget). 277 PHASE_SERVER_UPDATE_CLIENT_VISIBILITY = 67; 278 // DisplayImeController received the requested visibility for the IME and stored it. 279 PHASE_WM_DISPLAY_IME_CONTROLLER_SET_IME_REQUESTED_VISIBLE = 68; 280 // The control target reported its requestedVisibleTypes back to WindowManagerService. 281 PHASE_WM_UPDATE_DISPLAY_WINDOW_REQUESTED_VISIBLE_TYPES = 69; 282 // The requestedVisibleTypes have not been changed, so this request is not continued. 283 PHASE_WM_REQUESTED_VISIBLE_TYPES_NOT_CHANGED = 70; 284 // Updating the currently animating types on the client side. 285 PHASE_CLIENT_UPDATE_ANIMATING_TYPES = 71; 286 // Updating the animating types in the WindowState on the WindowManager side. 287 PHASE_WM_UPDATE_ANIMATING_TYPES = 72; 288 // Animating types of the WindowState have changed, now sending them to state controller. 289 PHASE_WM_WINDOW_ANIMATING_TYPES_CHANGED = 73; 290 // ImeInsetsSourceProvider got notified that the hide animation is finished. 291 PHASE_WM_NOTIFY_HIDE_ANIMATION_FINISHED = 74; 292 // The control target reported its animatingTypes back to WindowManagerService. 293 PHASE_WM_UPDATE_DISPLAY_WINDOW_ANIMATING_TYPES = 75; 294 // InsetsController received a control for the IME. 295 PHASE_CLIENT_ON_CONTROLS_CHANGED = 76; 296 // Reached the IME invoker on the server. 297 PHASE_SERVER_IME_INVOKER = 77; 298 // Reached the IME client invoker on the server. 299 PHASE_SERVER_CLIENT_INVOKER = 78; 300} 301 302