@@ -386,6 +386,7 @@ public String toString() {
386386 private Locale mLastSystemLocale ;
387387 private final MyPackageMonitor mMyPackageMonitor = new MyPackageMonitor ();
388388 private final IPackageManager mIPackageManager ;
389+ private boolean mInputBoundToKeyguard ;
389390
390391 class SettingsObserver extends ContentObserver {
391392 SettingsObserver (Handler handler ) {
@@ -877,10 +878,12 @@ private void refreshImeWindowVisibilityLocked() {
877878 final boolean hardKeyShown = haveHardKeyboard
878879 && conf .hardKeyboardHidden
879880 != Configuration .HARDKEYBOARDHIDDEN_YES ;
880- final boolean isScreenLocked = mKeyguardManager != null
881- && mKeyguardManager .isKeyguardLocked ()
882- && mKeyguardManager .isKeyguardSecure ();
883- mImeWindowVis = (!isScreenLocked && (mInputShown || hardKeyShown )) ?
881+ final boolean isScreenLocked =
882+ mKeyguardManager != null && mKeyguardManager .isKeyguardLocked ();
883+ final boolean isScreenSecurelyLocked =
884+ isScreenLocked && mKeyguardManager .isKeyguardSecure ();
885+ final boolean inputShown = mInputShown && (!isScreenLocked || mInputBoundToKeyguard );
886+ mImeWindowVis = (!isScreenSecurelyLocked && (inputShown || hardKeyShown )) ?
884887 (InputMethodService .IME_ACTIVE | InputMethodService .IME_VISIBLE ) : 0 ;
885888 updateImeWindowStatusLocked ();
886889 }
@@ -1124,6 +1127,13 @@ InputBindResult startInputUncheckedLocked(ClientState cs,
11241127 return mNoBinding ;
11251128 }
11261129
1130+ if (mCurClient == null ) {
1131+ mInputBoundToKeyguard = mKeyguardManager != null && mKeyguardManager .isKeyguardLocked ();
1132+ if (DEBUG ) {
1133+ Slog .v (TAG , "New bind. keyguard = " + mInputBoundToKeyguard );
1134+ }
1135+ }
1136+
11271137 if (mCurClient != cs ) {
11281138 // If the client is changing, we need to switch over to the new
11291139 // one.
0 commit comments