diff options
| author | Yohei Yukawa <yukawa@google.com> | 2015-05-29 20:41:24 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-29 20:41:25 +0000 |
| commit | 650a91356b59fe4100f624c0b32d397ec00d51d9 (patch) | |
| tree | c63efedf560f8a0649fc61dd3c4bf05a98887a4d /core/java/android | |
| parent | f042cd841fcc6607bb84f8ddb25db3f4b6ddb3e0 (diff) | |
| parent | 0b52ed02dfc8c61e1a999d9c236f64503f7919d1 (diff) | |
Merge "Revert "Rely on IMM#focusOut() to close input session."" into mnc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/inputmethod/InputMethodManager.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 3f7bad626c81..f61e372c26b0 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -1306,12 +1306,16 @@ public final class InputMethodManager { if (DEBUG) Log.v(TAG, "focusOut: " + view + " mServedView=" + mServedView + " winFocus=" + view.hasWindowFocus()); - // 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); + 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); + } } } } |
