diff options
author | Yohei Yukawa <yukawa@google.com> | 2015-05-28 23:52:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-28 23:52:50 +0000 |
commit | 5176b5451a8447de3ff86712a95efd6af93aa556 (patch) | |
tree | f02471abb86047648ccc15f57d9d21bc7e27085a | |
parent | 19d9d0ca2e95eca34e8f7b28023aa10f15d82f88 (diff) | |
parent | 41bb4953dad33b56b6d039d5bc87a574a0b70fe9 (diff) | |
download | frameworks_base-5176b5451a8447de3ff86712a95efd6af93aa556.zip frameworks_base-5176b5451a8447de3ff86712a95efd6af93aa556.tar.gz frameworks_base-5176b5451a8447de3ff86712a95efd6af93aa556.tar.bz2 |
Merge "Rely on IMM#focusOut() to close input session." into mnc-dev
-rw-r--r-- | core/java/android/view/inputmethod/InputMethodManager.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index f61e372..3f7bad6 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -1306,16 +1306,12 @@ public final class InputMethodManager { if (DEBUG) Log.v(TAG, "focusOut: " + view + " mServedView=" + mServedView + " winFocus=" + view.hasWindowFocus()); - if (mServedView != view) { - // The following code would auto-hide the IME if we end up - // with no more views with focus. This can happen, however, - // whenever we go into touch mode, so it ends up hiding - // at times when we don't really want it to. For now it - // seems better to just turn it all off. - if (false && view.hasWindowFocus()) { - mNextServedView = null; - scheduleCheckFocusLocked(view); - } + // CAVEAT: We have ignored focusOut event in Android L MR-1 and prior. Need special + // care when changing the logic here because there are so many cases to be taken into + // consideration, e.g., WindowManager.LayoutParams.SOFT_INPUT_* flags. + if (mServedView == view && view.hasWindowFocus()) { + mNextServedView = null; + scheduleCheckFocusLocked(view); } } } |