diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-15 18:09:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-15 18:10:07 +0000 |
commit | ef66f191282a1a576ff5e5fec2c3351e0022b5fa (patch) | |
tree | ec881bb8a3994779fd39ed49ff1a3e0d4302cdd0 | |
parent | e726dbfa268823330b6304a74180af3f7ff58dfa (diff) | |
parent | f3b8fbdd60ef4abebd622e6fb7983fe077baa0a0 (diff) |
Merge "Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing"
-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(); } |