Skip to content

Commit 419ad1e

Browse files
satok16Android (Google) Code Review
authored andcommitted
Merge "Fix a bug with IME blinking just after leaving the lock screen"
2 parents f671061 + 05a6cbe commit 419ad1e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/java/android/view/inputmethod/InputMethodManager.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ public void handleMessage(Message msg) {
405405
}
406406
// Check focus again in case that "onWindowFocus" is called before
407407
// handling this message.
408-
checkFocus(mHasBeenInactive);
408+
if (mServedView != null && mServedView.hasWindowFocus()) {
409+
checkFocus(mHasBeenInactive);
410+
}
409411
}
410412
}
411413
return;
@@ -1202,7 +1204,9 @@ private boolean checkFocusNoStartInput(boolean forceNewFocus) {
12021204
}
12031205
if (DEBUG) Log.v(TAG, "checkFocus: view=" + mServedView
12041206
+ " next=" + mNextServedView
1205-
+ " forceNewFocus=" + forceNewFocus);
1207+
+ " forceNewFocus=" + forceNewFocus
1208+
+ " package="
1209+
+ (mServedView != null ? mServedView.getContext().getPackageName() : "<none>"));
12061210

12071211
if (mNextServedView == null) {
12081212
finishInputLocked();

0 commit comments

Comments
 (0)