diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 6a4dbc8d722..e5f4a11ba4c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -241,6 +241,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { // If the user long pressed the lock icon, disabling face auth for the current session. private boolean mLockIconPressed; + private final boolean mFingerprintWakeAndUnlock; + /** * Short delay before restarting biometric authentication after a successful try * This should be slightly longer than the time between on<biometric>Authenticated @@ -1435,6 +1437,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mSubscriptionManager = SubscriptionManager.from(context); mDeviceProvisioned = isDeviceProvisionedInSettingsDb(); mStrongAuthTracker = new StrongAuthTracker(context, this::notifyStrongAuthStateChanged); + mFingerprintWakeAndUnlock = mContext.getResources().getBoolean( + com.android.keyguard.R.bool.config_fingerprintWakeAndUnlock); // Since device can't be un-provisioned, we only need to register a content observer // to update mDeviceProvisioned when we are... @@ -1613,12 +1617,18 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private boolean shouldListenForFingerprint() { // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. - final boolean shouldListen = (mKeyguardIsVisible || !mDeviceInteractive || - (mBouncer && !mKeyguardGoingAway) || mGoingToSleep || - shouldListenForFingerprintAssistant() || (mKeyguardOccluded && mIsDreaming)) - && !mSwitchingUser && !isFingerprintDisabled(getCurrentUser()) - && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser; - return shouldListen; + if (!mFingerprintWakeAndUnlock) { + return (mKeyguardIsVisible || mBouncer || shouldListenForFingerprintAssistant() || + (mKeyguardOccluded && mIsDreaming)) && mDeviceInteractive && !mGoingToSleep + && !mSwitchingUser && !isFingerprintDisabled(getCurrentUser()) + && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser; + } else { + return (mKeyguardIsVisible || !mDeviceInteractive || + (mBouncer && !mKeyguardGoingAway) || mGoingToSleep || + shouldListenForFingerprintAssistant() || (mKeyguardOccluded && mIsDreaming)) + && !mSwitchingUser && !isFingerprintDisabled(getCurrentUser()) + && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser; + } } private boolean shouldListenForFace() { |