commit | 9c9a11f8f0462170a1f6ab3368970959405ef1df | [log] [tgz] |
---|---|---|
author | Felix Stern <fstern@google.com> | Thu Jan 09 07:59:53 2025 -0800 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jan 15 07:21:10 2025 -0800 |
tree | c645380d9e3a76105db19cd04a92df1f9dd03782 | |
parent | 7b67cfb26ba137e82843522374c32810a389f698 [diff] |
Copy requestedImeVisible state also if stylus is used By not copying the previous requested IME state when using stylus, InputMethodService#showSoftInput won't be called. In some cases, the IME was therefore stuck. Fix: 384608941 Test: StylusHandwritingTest#testOnViewClicked_withStylusTap Flag: android.view.inputmethod.refactor_insets_controller (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:35e062760ff8731630e55c2e234b78b5a2db1c5c) Merged-In: Ie808e18a28b34c4c41eedc84a63c1e801ac1d4cc Change-Id: Ie808e18a28b34c4c41eedc84a63c1e801ac1d4cc
diff --git a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java index b0dff22..281db0a 100644 --- a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java +++ b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
@@ -387,8 +387,9 @@ @GuardedBy("ImfLock.class") void setWindowState(IBinder windowToken, @NonNull ImeTargetWindowState newState) { final ImeTargetWindowState state = mRequestWindowStateMap.get(windowToken); - if (state != null && newState.hasEditorFocused() - && newState.mToolType != MotionEvent.TOOL_TYPE_STYLUS) { + if (state != null && newState.hasEditorFocused() && ( + newState.mToolType != MotionEvent.TOOL_TYPE_STYLUS + || Flags.refactorInsetsController())) { // Inherit the last requested IME visible state when the target window is still // focused with an editor. newState.setRequestedImeVisible(state.mRequestedImeVisible);