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} 84 85// The type of the IME request, used by android/view/inputmethod/ImeTracker.java. 86enum ImeRequestTypeEnum { 87 // IME request type not set. 88 TYPE_NOT_SET = 0; 89 // IME show request type. 90 TYPE_SHOW = 1; 91 // IME hide request type. 92 TYPE_HIDE = 2; 93 // IME user-controlled animation request type. 94 TYPE_USER = 3; 95} 96 97// The status of the IME request, used by android/view/inputmethod/ImeTracker.java. 98enum ImeRequestStatusEnum { 99 // IME request status not set. 100 STATUS_NOT_SET = 0; 101 // IME request running. 102 STATUS_RUN = 1; 103 // IME request cancelled. 104 STATUS_CANCEL = 2; 105 // IME request failed. 106 STATUS_FAIL = 3; 107 // IME request succeeded. 108 STATUS_SUCCESS = 4; 109 // IME request timed out. 110 STATUS_TIMEOUT = 5; 111} 112 113// The origin of the IME request, used by android/view/inputmethod/ImeTracker.java. 114enum ImeRequestOriginEnum { 115 // IME request origin not set. 116 ORIGIN_NOT_SET = 0; 117 // The IME show request originated in the client. 118 ORIGIN_CLIENT_SHOW_SOFT_INPUT = 1 [deprecated = true]; 119 // The IME hide request originated in the client. 120 ORIGIN_CLIENT_HIDE_SOFT_INPUT = 2 [deprecated = true]; 121 // The IME show request originated in the server. 122 ORIGIN_SERVER_START_INPUT = 3 [deprecated = true]; 123 // The IME hide request originated in the server. 124 ORIGIN_SERVER_HIDE_INPUT = 4 [deprecated = true]; 125 // The IME request originated in the client. 126 ORIGIN_CLIENT = 5; 127 // The IME request originated in the server. 128 ORIGIN_SERVER = 6; 129 // The IME request originated in the IME. 130 ORIGIN_IME = 7; 131 // The IME request originated in the WindowManager Shell. 132 ORIGIN_WM_SHELL = 8; 133} 134 135enum ImeRequestPhaseEnum { 136 // IME request phase not set. 137 PHASE_NOT_SET = 0; 138 // The view that requested the IME has been served by the IMM. 139 PHASE_CLIENT_VIEW_SERVED = 1; 140 // The IME client that requested the IME has window manager focus. 141 PHASE_SERVER_CLIENT_KNOWN = 2; 142 // The IME client that requested the IME has IME focus. 143 PHASE_SERVER_CLIENT_FOCUSED = 3; 144 // The IME request complies with the current accessibility settings. 145 PHASE_SERVER_ACCESSIBILITY = 4; 146 // The server is ready to run third party code. 147 PHASE_SERVER_SYSTEM_READY = 5; 148 // Checked the implicit hide request against any explicit show requests. 149 PHASE_SERVER_HIDE_IMPLICIT = 6; 150 // Checked the not-always hide request against any forced show requests. 151 PHASE_SERVER_HIDE_NOT_ALWAYS = 7; 152 // The server is waiting for a connection to the IME. 153 PHASE_SERVER_WAIT_IME = 8; 154 // The server has a connection to the IME. 155 PHASE_SERVER_HAS_IME = 9; 156 // The server decided the IME should be hidden. 157 PHASE_SERVER_SHOULD_HIDE = 10; 158 // Reached the IME wrapper. 159 PHASE_IME_WRAPPER = 11; 160 // Dispatched from the IME wrapper to the IME. 161 PHASE_IME_WRAPPER_DISPATCH = 12; 162 // Reached the IME's showSoftInput method. 163 PHASE_IME_SHOW_SOFT_INPUT = 13; 164 // Reached the IME's hideSoftInput method. 165 PHASE_IME_HIDE_SOFT_INPUT = 14; 166 // The server decided the IME should be shown. 167 PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE = 15; 168 // Requested applying the IME visibility in the insets source consumer. 169 PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER = 16 [deprecated = true]; 170 // Applied the IME visibility. 171 PHASE_SERVER_APPLY_IME_VISIBILITY = 17; 172 // Started the show IME runner. 173 PHASE_WM_SHOW_IME_RUNNER = 18; 174 // Ready to show IME. 175 PHASE_WM_SHOW_IME_READY = 19; 176 // The Window Manager has a connection to the IME insets control target. 177 PHASE_WM_HAS_IME_INSETS_CONTROL_TARGET = 20; 178 // Reached the window insets control target's show insets method. 179 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_SHOW_INSETS = 21; 180 // Reached the window insets control target's hide insets method. 181 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_HIDE_INSETS = 22; 182 // Reached the remote insets control target's show insets method. 183 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_SHOW_INSETS = 23; 184 // Reached the remote insets control target's hide insets method. 185 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_HIDE_INSETS = 24; 186 // Reached the remote insets controller. 187 PHASE_WM_REMOTE_INSETS_CONTROLLER = 25; 188 // Created the IME window insets show animation. 189 PHASE_WM_ANIMATION_CREATE = 26; 190 // Started the IME window insets show animation. 191 PHASE_WM_ANIMATION_RUNNING = 27; 192 // Reached the client's show insets method. 193 PHASE_CLIENT_SHOW_INSETS = 28; 194 // Reached the client's hide insets method. 195 PHASE_CLIENT_HIDE_INSETS = 29; 196 // Handling the IME window insets show request. 197 PHASE_CLIENT_HANDLE_SHOW_INSETS = 30; 198 // Handling the IME window insets hide request. 199 PHASE_CLIENT_HANDLE_HIDE_INSETS = 31; 200 // Applied the IME window insets show animation. 201 PHASE_CLIENT_APPLY_ANIMATION = 32; 202 // Started the IME window insets show animation. 203 PHASE_CLIENT_CONTROL_ANIMATION = 33; 204 // Checked that the IME is controllable. 205 PHASE_CLIENT_DISABLED_USER_ANIMATION = 34 [deprecated = true]; 206 // Collecting insets source controls. 207 PHASE_CLIENT_COLLECT_SOURCE_CONTROLS = 35; 208 // Reached the insets source consumer's show request method. 209 PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW = 36; 210 // Reached input method manager's request IME show method. 211 PHASE_CLIENT_REQUEST_IME_SHOW = 37; 212 // Reached the insets source consumer's notify hidden method. 213 PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN = 38; 214 // Queued the IME window insets show animation. 215 PHASE_CLIENT_ANIMATION_RUNNING = 39; 216 // Cancelled the IME window insets show animation. 217 PHASE_CLIENT_ANIMATION_CANCEL = 40; 218 // Finished the IME window insets show animation. 219 PHASE_CLIENT_ANIMATION_FINISHED_SHOW = 41; 220 // Finished the IME window insets hide animation. 221 PHASE_CLIENT_ANIMATION_FINISHED_HIDE = 42; 222 // Aborted the request to show the IME post layout. 223 PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT = 43; 224 // Reached the IME's showWindow method. 225 PHASE_IME_SHOW_WINDOW = 44; 226 // Reached the IME's hideWindow method. 227 PHASE_IME_HIDE_WINDOW = 45; 228 // Reached the InputMethodPrivilegedOperations handler. 229 PHASE_IME_PRIVILEGED_OPERATIONS = 46; 230 // Checked that the calling IME is the currently active IME. 231 PHASE_SERVER_CURRENT_ACTIVE_IME = 47; 232} 233 234