diff options
| author | Wale Ogunwale <ogunwale@google.com> | 2015-05-14 19:29:34 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-14 19:29:35 +0000 |
| commit | 92847c968754f3fc2ffe849cf54ef6dd49b3e744 (patch) | |
| tree | cce77c8c73c264fe9ad6d29bb02c2c83e218a33c /core/java/android/view/ViewRootImpl.java | |
| parent | 0125d76fa37d26a29f06371ff349546e21cd3f4d (diff) | |
| parent | 159c3d8a8b99c9a7c9d7cb3013a622fdf2c6c04a (diff) | |
| download | frameworks_base-92847c968754f3fc2ffe849cf54ef6dd49b3e744.zip frameworks_base-92847c968754f3fc2ffe849cf54ef6dd49b3e744.tar.gz frameworks_base-92847c968754f3fc2ffe849cf54ef6dd49b3e744.tar.bz2 | |
Merge "Revert "Update IME focus when the active view is losing the focus."" into mnc-dev
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 1cbd886..4f2a3fa 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2015,6 +2015,7 @@ public final class ViewRootImpl implements ViewParent, mLastWasImTarget = imTarget; InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null && imTarget) { + imm.startGettingWindowFocus(mView); imm.onWindowFocus(mView, mView.findFocus(), mWindowAttributes.softInputMode, !mHasHadWindowFocus, mWindowAttributes.flags); @@ -3321,6 +3322,10 @@ public final class ViewRootImpl implements ViewParent, InputMethodManager imm = InputMethodManager.peekInstance(); if (mView != null) { + if (hasWindowFocus && imm != null && mLastWasImTarget && + !isInLocalFocusMode()) { + imm.startGettingWindowFocus(mView); + } mAttachInfo.mKeyDispatchState.reset(); mView.dispatchWindowFocusChanged(hasWindowFocus); mAttachInfo.mTreeObserver.dispatchOnWindowFocusChange(hasWindowFocus); |
