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

Commit a795bbdc authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Isolate DPM and SIM PIN states from UX" into qt-r1-dev am: 428385c4 am: 1702308f

am: a03958cd

Change-Id: Iae03f79eed5fc55ddc7dc8025ab70d98e5e1a728
parents c8736439 a03958cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
     */
    private void updateBiometricRetry() {
        SecurityMode securityMode = getSecurityMode();
        mSwipeUpToRetry = mUnlockMethodCache.isUnlockingWithFacePossible()
        mSwipeUpToRetry = mUnlockMethodCache.isFaceAuthEnabled()
                && securityMode != SecurityMode.SimPin
                && securityMode != SecurityMode.SimPuk
                && securityMode != SecurityMode.None;
+5 −3
Original line number Diff line number Diff line
@@ -1783,13 +1783,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                && mFpm.getEnrolledFingerprints(userId).size() > 0;
    }

    private boolean isUnlockWithFacePossible(int userId) {
        return isFaceAuthEnabledForUser(userId) && !isFaceDisabled(userId);
    }

    /**
     * If face hardware is available, user has enrolled and enabled auth via setting.
     * Not considering encryption or lock down state.
     */
    public boolean isUnlockWithFacePossible(int userId) {
    public boolean isFaceAuthEnabledForUser(int userId) {
        return mFaceManager != null && mFaceManager.isHardwareDetected()
                && !isFaceDisabled(userId)
                && mFaceManager.hasEnrolledTemplates(userId)
                && mFaceSettingEnabledForUser.get(userId);
    }
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ public class KeyguardBouncer {

        // Split up the work over multiple frames.
        DejankUtils.removeCallbacks(mResetRunnable);
        if (mUnlockMethodCache.isUnlockingWithFacePossible() && !needsFullscreenBouncer()
        if (mUnlockMethodCache.isFaceAuthEnabled() && !needsFullscreenBouncer()
                && !mKeyguardUpdateMonitor.userNeedsStrongAuth()) {
            mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ class KeyguardBypassController {
     * If face unlock dismisses the lock screen or keeps user on keyguard for the current user.
     */
    var bypassEnabled: Boolean = false
        get() = field && unlockMethodCache.isUnlockingWithFacePossible
        get() = field && unlockMethodCache.isFaceAuthEnabled
        private set

    var bouncerShowing: Boolean = false
+4 −0
Original line number Diff line number Diff line
@@ -2389,6 +2389,10 @@ public class StatusBar extends SystemUI implements DemoMode,
            mLightBarController.dump(fd, pw, args);
        }

        if (mUnlockMethodCache != null) {
            mUnlockMethodCache.dump(pw);
        }

        if (mKeyguardBypassController != null) {
            mKeyguardBypassController.dump(pw);
        }
Loading