diff options
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java | 13 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index dce4b61c544f..e7acbb3a133f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -164,7 +164,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private int mRingMode; private int mPhoneState; private boolean mKeyguardIsVisible; - + private boolean mKeyguardGoingAway; private boolean mGoingToSleep; private boolean mBouncer; private boolean mBootCompleted; @@ -412,6 +412,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } + /** + * Updates KeyguardUpdateMonitor's internal state to know if keyguard is goingAway + * @param goingAway + */ + public void setKeyguardGoingAway(boolean goingAway) { + mKeyguardGoingAway = goingAway; + } + private void onFingerprintAuthenticated(int userId) { Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated"); mUserFingerprintAuthenticated.put(userId, true); @@ -1123,7 +1131,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private boolean shouldListenForFingerprint() { - return (mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep) + return (mKeyguardIsVisible || !mDeviceInteractive || + (mBouncer && !mKeyguardGoingAway) || mGoingToSleep) && (!mSwitchingUser && !isFingerprintDisabled(getCurrentUser()) || mEnableNextFingerprint); } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 2504e367755e..a44a86afe275 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -1696,7 +1696,6 @@ public class KeyguardViewMediator extends SystemUI { mHideAnimationRun = false; adjustStatusBarLocked(); userActivity(); - mShowKeyguardWakeLock.release(); } mKeyguardDisplayManager.show(); @@ -1723,6 +1722,7 @@ public class KeyguardViewMediator extends SystemUI { flags |= WindowManagerPolicy.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER; } + mUpdateMonitor.setKeyguardGoingAway(true /* goingAway */); // Don't actually hide the Keyguard at the moment, wait for window // manager until it tells us it's safe to do so with // startKeyguardExitAnimation. @@ -1804,6 +1804,7 @@ public class KeyguardViewMediator extends SystemUI { adjustStatusBarLocked(); mDismissCallbackRegistry.notifyDismissSucceeded(); sendUserPresentBroadcast(); + mUpdateMonitor.setKeyguardGoingAway(false /* goingAway */); } Trace.endSection(); } |