diff options
author | 2018-06-07 14:10:31 -0700 | |
---|---|---|
committer | 2018-06-07 14:10:31 -0700 | |
commit | 8c2440635573940eb6371e18cf4abb69b733f28c (patch) | |
tree | 6428be7ef76e04d040acbe5125e27e5e832901ed /packages/SystemUI/src | |
parent | 07ce67ecdf940b780219353c467f1c457f614bd4 (diff) | |
parent | e752b75dadbae20ab28d6e75e342707288e09fd3 (diff) |
Merge "Hide backdrop when waking up from fp" into pi-dev
am: e752b75dad
Change-Id: Idebf2c288fa3de5a05329c9d0f53f9183c834d0e
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java | 13 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 10 |
2 files changed, 17 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java index 76860e62435a..f0b1a82cfc2f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java @@ -403,10 +403,19 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { pw.print(" mWakeLock="); pw.println(mWakeLock); } + /** + * Successful authentication with fingerprint that wakes up the device. + */ public boolean isWakeAndUnlock() { - return mMode == MODE_UNLOCK - || mMode == MODE_WAKE_AND_UNLOCK + return mMode == MODE_WAKE_AND_UNLOCK || mMode == MODE_WAKE_AND_UNLOCK_PULSING || mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM; } + + /** + * Successful authentication with fingerprint when the screen was either on or off. + */ + public boolean isFingerprintUnlock() { + return isWakeAndUnlock() || mMode == MODE_UNLOCK; + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index c70f03405db3..7bbeed63fd98 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -1599,7 +1599,9 @@ public class StatusBar extends SystemUI implements DemoMode, return; // called too early } - if (mLaunchTransitionFadingAway) { + boolean wakeAndUnlock = mFingerprintUnlockController != null + && mFingerprintUnlockController.isWakeAndUnlock(); + if (mLaunchTransitionFadingAway || wakeAndUnlock) { mBackdrop.setVisibility(View.INVISIBLE); Trace.endSection(); return; @@ -4712,11 +4714,11 @@ public class StatusBar extends SystemUI implements DemoMode, // We don't want to end up in KEYGUARD state when we're unlocking with // fingerprint from doze. We should cross fade directly from black. - final boolean wakeAndUnlocking = mFingerprintUnlockController.getMode() - == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK; + boolean wakeAndUnlocking = mFingerprintUnlockController.isWakeAndUnlock(); // Do not animate the scrim expansion when triggered by the fingerprint sensor. - mScrimController.setExpansionAffectsAlpha(!mFingerprintUnlockController.isWakeAndUnlock()); + mScrimController.setExpansionAffectsAlpha( + !mFingerprintUnlockController.isFingerprintUnlock()); if (mBouncerShowing) { // Bouncer needs the front scrim when it's on top of an activity, |