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

Commit 57c81dfa authored by Robert Snoeberger's avatar Robert Snoeberger Committed by android-build-merger
Browse files

Merge "Don't listen for face when in `lockout` or `lockdown`" into qt-r1-dev am: 16f1032a

am: 3e58c31f

Change-Id: I6811e1db5010787f2db60fcd1ce1e34fb4968c41
parents 928f511e 3e58c31f
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -1658,13 +1658,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    private boolean shouldListenForFace() {
    private boolean shouldListenForFace() {
        final boolean awakeKeyguard = mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep;
        final boolean awakeKeyguard = mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep;
        final int user = getCurrentUser();
        final int user = getCurrentUser();
        final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user);
        final boolean isLockOutOrLockDown =
                strongAuth == StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT
                        || strongAuth == StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
        // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an
        // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an
        // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware.
        // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware.
        return (mBouncer || mAuthInterruptActive || awakeKeyguard || shouldListenForFaceAssistant())
        return (mBouncer || mAuthInterruptActive || awakeKeyguard || shouldListenForFaceAssistant())
                && !mSwitchingUser && !getUserCanSkipBouncer(user) && !isFaceDisabled(user)
                && !mSwitchingUser && !getUserCanSkipBouncer(user) && !isFaceDisabled(user)
                && !mKeyguardGoingAway && mFaceSettingEnabledForUser && !mLockIconPressed
                && !mKeyguardGoingAway && mFaceSettingEnabledForUser && !mLockIconPressed
                && mUserManager.isUserUnlocked(user) && mIsPrimaryUser
                && mUserManager.isUserUnlocked(user) && mIsPrimaryUser
                && !mSecureCameraLaunched;
                && !mSecureCameraLaunched && !isLockOutOrLockDown;
    }
    }


    /**
    /**