diff options
| author | 2020-02-28 23:04:58 +0000 | |
|---|---|---|
| committer | 2020-03-02 23:55:00 +0000 | |
| commit | a08d52535db71bcad173b8a70939f027f4e88fe5 (patch) | |
| tree | dcabbd1868b3cfeca534ba3b7cc7857aba704211 | |
| parent | b8da4a2c13519462de4c365c1cd5c267ebcdca97 (diff) | |
DO NOT MERGE: Revert: Freeup lock when IME is set inactive and unbound
Reason for revert:
Caused an unexpected regression Bug 144174015
Bug: 139806621
Bug: 144103599
Fix: 144174015
Test: Manually verified Bug 144174015 disappeared as follows
1. Open Gmail then start composing an email
2. Swipe up the home button to recents then re-launch Gmail
3. Do the step 2 several times.
4. Make sure that you can still type something on Gmail.
Change-Id: I04a77afea17f9d3eb05017fa00313fad4e48cd5c
(cherry picked from commit 9494c9dbb73b0ce237cb2f64fba90434b1b09c09)
| -rw-r--r-- | core/java/android/view/inputmethod/InputMethodManager.java | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index d3618adca6c4..d75810ad0e37 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -655,14 +655,14 @@ public final class InputMethodManager { } catch (RemoteException e) { } } - } - // Check focus again in case that "onWindowFocus" is called before - // handling this message. - if (mServedView != null && canStartInput(mServedView)) { - if (checkFocusNoStartInput(mRestartOnNextWindowFocus)) { - final int reason = active ? StartInputReason.ACTIVATED_BY_IMMS - : StartInputReason.DEACTIVATED_BY_IMMS; - startInputInner(reason, null, 0, 0, 0); + // Check focus again in case that "onWindowFocus" is called before + // handling this message. + if (mServedView != null && canStartInput(mServedView)) { + if (checkFocusNoStartInput(mRestartOnNextWindowFocus)) { + final int reason = active ? StartInputReason.ACTIVATED_BY_IMMS + : StartInputReason.DEACTIVATED_BY_IMMS; + startInputInner(reason, null, 0, 0, 0); + } } } return; @@ -1225,10 +1225,6 @@ public final class InputMethodManager { */ void clearBindingLocked() { if (DEBUG) Log.v(TAG, "Clearing binding!"); - if (mWindowFocusGainFuture != null) { - mWindowFocusGainFuture.cancel(false /* mayInterruptIfRunning */); - mWindowFocusGainFuture = null; - } clearConnectionLocked(); setInputChannelLocked(null); mBindSequence = -1; |