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

Commit 428385c4 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Isolate DPM and SIM PIN states from UX" into qt-r1-dev

parents 201d00ed 4c507046
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
@@ -2390,6 +2390,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