diff options
-rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 484b47022f04..334e7b5240ce 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -649,12 +649,25 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. visibilityStateComputer.getImePolicy().setA11yRequestNoSoftKeyboard( accessibilitySoftKeyboardSetting); if (visibilityStateComputer.getImePolicy().isA11yRequestNoSoftKeyboard()) { - hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, - 0 /* flags */, SoftInputShowHideReason.HIDE_SETTINGS_ON_CHANGE, userId); + if (Flags.refactorInsetsController()) { + final var statsToken = createStatsTokenForFocusedClient(false /* show */, + SoftInputShowHideReason.HIDE_SETTINGS_ON_CHANGE, userId); + setImeVisibilityOnFocusedWindowClient(false, userData, statsToken); + } else { + hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, + 0 /* flags */, SoftInputShowHideReason.HIDE_SETTINGS_ON_CHANGE, + userId); + } } else if (isShowRequestedForCurrentWindow(userId)) { - showCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, - InputMethodManager.SHOW_IMPLICIT, - SoftInputShowHideReason.SHOW_SETTINGS_ON_CHANGE, userId); + if (Flags.refactorInsetsController()) { + final var statsToken = createStatsTokenForFocusedClient(true /* show */, + SoftInputShowHideReason.SHOW_SETTINGS_ON_CHANGE, userId); + setImeVisibilityOnFocusedWindowClient(true, userData, statsToken); + } else { + showCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, + InputMethodManager.SHOW_IMPLICIT, + SoftInputShowHideReason.SHOW_SETTINGS_ON_CHANGE, userId); + } } break; } |