@@ -224,6 +224,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
224224 private LockPatternUtils mLockPatternUtils ;
225225 private final IDreamManager mDreamManager ;
226226 private boolean mIsDreaming ;
227+ private final boolean mFingerprintWakeAndUnlock ;
227228
228229 /**
229230 * Short delay before restarting fingerprint authentication after a successful try
@@ -1128,6 +1129,8 @@ private KeyguardUpdateMonitor(Context context) {
11281129 mSubscriptionManager = SubscriptionManager .from (context );
11291130 mDeviceProvisioned = isDeviceProvisionedInSettingsDb ();
11301131 mStrongAuthTracker = new StrongAuthTracker (context );
1132+ mFingerprintWakeAndUnlock = mContext .getResources ().getBoolean (
1133+ com .android .keyguard .R .bool .config_fingerprintWakeAndUnlock );
11311134
11321135 // Since device can't be un-provisioned, we only need to register a content observer
11331136 // to update mDeviceProvisioned when we are...
@@ -1228,11 +1231,18 @@ private boolean shouldListenForFingerprintAssistant() {
12281231 }
12291232
12301233 private boolean shouldListenForFingerprint () {
1231- return (mKeyguardIsVisible || !mDeviceInteractive ||
1232- (mBouncer && !mKeyguardGoingAway ) || mGoingToSleep ||
1233- shouldListenForFingerprintAssistant () || (mKeyguardOccluded && mIsDreaming ))
1234- && !mSwitchingUser && !isFingerprintDisabled (getCurrentUser ())
1235- && !mKeyguardGoingAway ;
1234+ if (!mFingerprintWakeAndUnlock ) {
1235+ return (mKeyguardIsVisible || mBouncer || shouldListenForFingerprintAssistant () ||
1236+ (mKeyguardOccluded && mIsDreaming )) && mDeviceInteractive && !mGoingToSleep
1237+ && !mSwitchingUser && !isFingerprintDisabled (getCurrentUser ())
1238+ && !mKeyguardGoingAway ;
1239+ } else {
1240+ return (mKeyguardIsVisible || !mDeviceInteractive ||
1241+ (mBouncer && !mKeyguardGoingAway ) || mGoingToSleep ||
1242+ shouldListenForFingerprintAssistant () || (mKeyguardOccluded && mIsDreaming ))
1243+ && !mSwitchingUser && !isFingerprintDisabled (getCurrentUser ())
1244+ && !mKeyguardGoingAway ;
1245+ }
12361246 }
12371247
12381248 private void startListeningForFingerprint () {
0 commit comments