Fix IME down caret in keyguard nav bar bug.
The input method manager service now keeps track of whether or not the ime was shown on the keyguard. This prevents activities behind the keyguard from incorrectly showing the down-caret in the keyguard. Bug:7498792 Change-Id: I0de01ec29cb544e902305b0f9d9fb94a73835e7b
This commit is contained in:
@@ -386,6 +386,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
private Locale mLastSystemLocale;
|
||||
private final MyPackageMonitor mMyPackageMonitor = new MyPackageMonitor();
|
||||
private final IPackageManager mIPackageManager;
|
||||
private boolean mInputBoundToKeyguard;
|
||||
|
||||
class SettingsObserver extends ContentObserver {
|
||||
SettingsObserver(Handler handler) {
|
||||
@@ -877,10 +878,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
final boolean hardKeyShown = haveHardKeyboard
|
||||
&& conf.hardKeyboardHidden
|
||||
!= Configuration.HARDKEYBOARDHIDDEN_YES;
|
||||
final boolean isScreenLocked = mKeyguardManager != null
|
||||
&& mKeyguardManager.isKeyguardLocked()
|
||||
&& mKeyguardManager.isKeyguardSecure();
|
||||
mImeWindowVis = (!isScreenLocked && (mInputShown || hardKeyShown)) ?
|
||||
final boolean isScreenLocked =
|
||||
mKeyguardManager != null && mKeyguardManager.isKeyguardLocked();
|
||||
final boolean isScreenSecurelyLocked =
|
||||
isScreenLocked && mKeyguardManager.isKeyguardSecure();
|
||||
final boolean inputShown = mInputShown && (!isScreenLocked || mInputBoundToKeyguard);
|
||||
mImeWindowVis = (!isScreenSecurelyLocked && (inputShown || hardKeyShown)) ?
|
||||
(InputMethodService.IME_ACTIVE | InputMethodService.IME_VISIBLE) : 0;
|
||||
updateImeWindowStatusLocked();
|
||||
}
|
||||
@@ -1124,6 +1127,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
return mNoBinding;
|
||||
}
|
||||
|
||||
if (mCurClient == null) {
|
||||
mInputBoundToKeyguard = mKeyguardManager != null && mKeyguardManager.isKeyguardLocked();
|
||||
if (DEBUG) {
|
||||
Slog.v(TAG, "New bind. keyguard = " + mInputBoundToKeyguard);
|
||||
}
|
||||
}
|
||||
|
||||
if (mCurClient != cs) {
|
||||
// If the client is changing, we need to switch over to the new
|
||||
// one.
|
||||
|
||||
Reference in New Issue
Block a user