summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ming-Shin Lu <lumark@google.com> 2020-10-21 00:57:05 +0800
committer Adrian Roos <roosa@google.com> 2020-11-12 10:12:59 +0000
commitbe3f005f01af22819ff565a2547fce505208be0b (patch)
treedc614ca7422a846be7016b88f74b118447dbcaf1
parentd3a425504e546c15cb93f4a621738b9982244885 (diff)
[RESTRICT AUTOMERGE] 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 Note that the QPR version of [1] already includes the follow-up changes in [2]. Fixes: 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 bcfbcd124e71..47008a7265d3 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -3275,9 +3275,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");