Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 129f60fe authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Only auth via FP when device is locked, when Assistant is on top

Fixes: 64586258

Test: 1) swipe FP up 2cm, touch FPS without letting go. device should stay in keyguard but become unlocked
2) launch assistant, touch FPS. No vibration should occur

Test: 1) set up smart lock
2) enter keyguard and make sure smart lock is working (device is unlocked)
3) launch assistant, touch FPS. No vibration should occur

Change-Id: I7177c02c881eee5d6dd2dbabcddc92ec31f8a686
parent 252efbcf
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1157,10 +1157,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        }
    }

    private boolean shouldListenForFingerprintAssistant() {
        return mAssistantVisible && mKeyguardOccluded
                && !mUserFingerprintAuthenticated.get(getCurrentUser(), false)
                && !mUserHasTrust.get(getCurrentUser(), false);
    }

    private boolean shouldListenForFingerprint() {
        return (mKeyguardIsVisible || !mDeviceInteractive ||
                (mBouncer && !mKeyguardGoingAway) || mGoingToSleep ||
                (mAssistantVisible && mKeyguardOccluded))
                shouldListenForFingerprintAssistant())
                && !mSwitchingUser && !isFingerprintDisabled(getCurrentUser())
                && !mKeyguardGoingAway;
    }