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} 66 67// The type of the IME request, used by android/view/inputmethod/ImeTracker.java. 68enum ImeRequestTypeEnum { 69 // IME request type not set. 70 TYPE_NOT_SET = 0; 71 // IME show request type. 72 TYPE_SHOW = 1; 73 // IME hide request type. 74 TYPE_HIDE = 2; 75} 76 77// The status of the IME request, used by android/view/inputmethod/ImeTracker.java. 78enum ImeRequestStatusEnum { 79 // IME request status not set. 80 STATUS_NOT_SET = 0; 81 // IME request running. 82 STATUS_RUN = 1; 83 // IME request cancelled. 84 STATUS_CANCEL = 2; 85 // IME request failed. 86 STATUS_FAIL = 3; 87 // IME request succeeded. 88 STATUS_SUCCESS = 4; 89 // IME request timed out. 90 STATUS_TIMEOUT = 5; 91} 92 93// The origin of the IME request, used by android/view/inputmethod/ImeTracker.java. 94enum ImeRequestOriginEnum { 95 // IME request origin not set. 96 ORIGIN_NOT_SET = 0; 97 // The IME show request originated in the client. 98 ORIGIN_CLIENT_SHOW_SOFT_INPUT = 1; 99 // The IME hide request originated in the client. 100 ORIGIN_CLIENT_HIDE_SOFT_INPUT = 2; 101 // The IME show request originated in the server. 102 ORIGIN_SERVER_START_INPUT = 3; 103 // The IME hide request originated in the server. 104 ORIGIN_SERVER_HIDE_INPUT = 4; 105} 106 107enum ImeRequestPhaseEnum { 108 // IME request phase not set. 109 PHASE_NOT_SET = 0; 110 // The view that requested the IME has been served by the IMM. 111 PHASE_CLIENT_VIEW_SERVED = 1; 112 // The IME client that requested the IME has window manager focus. 113 PHASE_SERVER_CLIENT_KNOWN = 2; 114 // The IME client that requested the IME has IME focus. 115 PHASE_SERVER_CLIENT_FOCUSED = 3; 116 // The IME request complies with the current accessibility settings. 117 PHASE_SERVER_ACCESSIBILITY = 4; 118 // The server is ready to run third party code. 119 PHASE_SERVER_SYSTEM_READY = 5; 120 // Checked the implicit hide request against any explicit show requests. 121 PHASE_SERVER_HIDE_IMPLICIT = 6; 122 // Checked the not-always hide request against any forced show requests. 123 PHASE_SERVER_HIDE_NOT_ALWAYS = 7; 124 // The server is waiting for a connection to the IME. 125 PHASE_SERVER_WAIT_IME = 8; 126 // The server has a connection to the IME. 127 PHASE_SERVER_HAS_IME = 9; 128 // The server decided the IME should be hidden. 129 PHASE_SERVER_SHOULD_HIDE = 10; 130 // Reached the IME wrapper. 131 PHASE_IME_WRAPPER = 11; 132 // Dispatched from the IME wrapper to the IME. 133 PHASE_IME_WRAPPER_DISPATCH = 12; 134 // Reached the IME' showSoftInput method. 135 PHASE_IME_SHOW_SOFT_INPUT = 13; 136 // Reached the IME' hideSoftInput method. 137 PHASE_IME_HIDE_SOFT_INPUT = 14; 138 // The server decided the IME should be shown. 139 PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE = 15; 140 // Requested applying the IME visibility in the insets source consumer. 141 PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER = 16; 142 // Applied the IME visibility. 143 PHASE_SERVER_APPLY_IME_VISIBILITY = 17; 144 // Created the show IME runner. 145 PHASE_WM_SHOW_IME_RUNNER = 18; 146 // Ready to show IME. 147 PHASE_WM_SHOW_IME_READY = 19; 148 // The Window Manager has a connection to the IME insets control target. 149 PHASE_WM_HAS_IME_INSETS_CONTROL_TARGET = 20; 150 // Reached the window insets control target's show insets method. 151 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_SHOW_INSETS = 21; 152 // Reached the window insets control target's hide insets method. 153 PHASE_WM_WINDOW_INSETS_CONTROL_TARGET_HIDE_INSETS = 22; 154 // Reached the remote insets control target's show insets method. 155 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_SHOW_INSETS = 23; 156 // Reached the remote insets control target's hide insets method. 157 PHASE_WM_REMOTE_INSETS_CONTROL_TARGET_HIDE_INSETS = 24; 158 // Reached the remote insets controller. 159 PHASE_WM_REMOTE_INSETS_CONTROLLER = 25; 160 // Created the IME window insets show animation. 161 PHASE_WM_ANIMATION_CREATE = 26; 162 // Started the IME window insets show animation. 163 PHASE_WM_ANIMATION_RUNNING = 27; 164 // Reached the client's show insets method. 165 PHASE_CLIENT_SHOW_INSETS = 28; 166 // Reached the client's hide insets method. 167 PHASE_CLIENT_HIDE_INSETS = 29; 168 // Handling the IME window insets show request. 169 PHASE_CLIENT_HANDLE_SHOW_INSETS = 30; 170 // Handling the IME window insets hide request. 171 PHASE_CLIENT_HANDLE_HIDE_INSETS = 31; 172 // Applied the IME window insets show animation. 173 PHASE_CLIENT_APPLY_ANIMATION = 32; 174 // Started the IME window insets show animation. 175 PHASE_CLIENT_CONTROL_ANIMATION = 33; 176 // Checked that the IME is controllable. 177 PHASE_CLIENT_DISABLED_USER_ANIMATION = 34; 178 // Collecting insets source controls. 179 PHASE_CLIENT_COLLECT_SOURCE_CONTROLS = 35; 180 // Reached the insets source consumer's show request method. 181 PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW = 36; 182 // Reached input method manager's request IME show method. 183 PHASE_CLIENT_REQUEST_IME_SHOW = 37; 184 // Reached the insets source consumer's notify hidden method. 185 PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN = 38; 186 // Queued the IME window insets show animation. 187 PHASE_CLIENT_ANIMATION_RUNNING = 39; 188 // Cancelled the IME window insets show animation. 189 PHASE_CLIENT_ANIMATION_CANCEL = 40; 190 // Finished the IME window insets show animation. 191 PHASE_CLIENT_ANIMATION_FINISHED_SHOW = 41; 192 // Finished the IME window insets hide animation. 193 PHASE_CLIENT_ANIMATION_FINISHED_HIDE = 42; 194} 195