summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ming-Shin Lu <lumark@google.com> 2020-10-21 00:57:05 +0800
committer Ming-Shin Lu <lumark@google.com> 2020-10-26 13:44:12 +0800
commitd9ef2445355d59fdd9f6dbf7ec4fd607bc06e60a (patch)
tree7e8c28e4e9d450c9ed38fef18e60a3f310f1a199
parentae31181f133dba251225d95169d95ee1574599af (diff)
Fix Keyboard shown after force stopped app package
CL[1] add a check in IMMS#hideCurrentInputLocked to ignore hide request when the current client or the current input session is null for preventing switching IME may have unexpected keyboard hidden when focusing the same window to start input case. A regression happens when forcing stop the app with focusing a editor and show soft-keyboard, because the hide request ignored as the above mentioned, so keyboard will be shown after the next input connection started since the mShowRequested didn't set to false by hidden request. As CL[2] uses sameWindowFocused to check all possible hide current keyboard call places in startInputOrWindowGainedFocusInternalLocked to hide soft-keyboard only when the window focus changes, so we should revert the check in IMMS#hideCurrentInputLocked to fix this keyboard visiblity issue. [1]: I37ae6e30d1de581ba15131c2a90396b3a522a4d6 [2]: I20e8076acc5fec3c055af0740e2e2a64b1fb6f0d Fix: 171009669 Test: atest KeyboardVisibilityControlTest Change-Id: I92accb513b728820a3043b365aa5fa4f3a1a34a5
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 9947ecd42e31..792a241f3399 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -3261,9 +3261,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
boolean hideCurrentInputLocked(IBinder windowToken, int flags, ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
- if (mCurClient == null || mCurClient.curSession == null) {
- return false;
- }
if ((flags&InputMethodManager.HIDE_IMPLICIT_ONLY) != 0
&& (mShowExplicitlyRequested || mShowForced)) {
if (DEBUG) Slog.v(TAG, "Not hiding: explicit show not cancelled by non-explicit hide");