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

Commit 86102500 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Minor face auth fixes" into udc-dev am: 06535b8b am: 119f9030"

parents 8fb6b6ba 154953c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard

        @Override
        public void onUserInput() {
            mKeyguardFaceAuthInteractor.onPrimaryBouncerUserInput();
            mUpdateMonitor.cancelFaceAuth();
        }

+16 −9
Original line number Diff line number Diff line
@@ -225,10 +225,17 @@ constructor(
    }

    private fun observeFaceAuthResettingConditions() {
        // Clear auth status when keyguard is going away or when the user is switching.
        merge(keyguardRepository.isKeyguardGoingAway, userRepository.userSwitchingInProgress)
            .onEach { goingAwayOrUserSwitchingInProgress ->
                if (goingAwayOrUserSwitchingInProgress) {
        // Clear auth status when keyguard is going away or when the user is switching or device
        // starts going to sleep.
        merge(
                keyguardRepository.wakefulness.map {
                    WakefulnessModel.isSleepingOrStartingToSleep(it)
                },
                keyguardRepository.isKeyguardGoingAway,
                userRepository.userSwitchingInProgress
            )
            .onEach { anyOfThemIsTrue ->
                if (anyOfThemIsTrue) {
                    _isAuthenticated.value = false
                    retryCount = 0
                    halErrorRetryJob?.cancel()
@@ -248,8 +255,8 @@ constructor(
                    "nonStrongBiometricIsNotAllowed",
                    faceDetectLog
                ),
                // We don't want to run face detect if it's not possible to authenticate with FP
                // from the bouncer. UDFPS is the only fp sensor type that won't support this.
                // We don't want to run face detect if fingerprint can be used to unlock the device
                // but it's not possible to authenticate with FP from the bouncer (UDFPS)
                logAndObserve(
                    and(isUdfps(), deviceEntryFingerprintAuthRepository.isRunning).isFalse(),
                    "udfpsAuthIsNotPossibleAnymore",
@@ -306,7 +313,7 @@ constructor(
                logAndObserve(
                    combine(
                        keyguardInteractor.isSecureCameraActive,
                        alternateBouncerInteractor.isVisible,
                        alternateBouncerInteractor.isVisible
                    ) { a, b ->
                        !a || b
                    },
@@ -334,12 +341,12 @@ constructor(
                logAndObserve(isLockedOut.isFalse(), "isNotInLockOutState", faceAuthLog),
                logAndObserve(
                    deviceEntryFingerprintAuthRepository.isLockedOut.isFalse(),
                    "fpLockedOut",
                    "fpIsNotLockedOut",
                    faceAuthLog
                ),
                logAndObserve(
                    trustRepository.isCurrentUserTrusted.isFalse(),
                    "currentUserTrusted",
                    "currentUserIsNotTrusted",
                    faceAuthLog
                ),
                logAndObserve(
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ interface KeyguardFaceAuthInteractor {
    fun onQsExpansionStared()
    fun onNotificationPanelClicked()
    fun onSwipeUpOnBouncer()
    fun onPrimaryBouncerUserInput()
}

/**
+1 −0
Original line number Diff line number Diff line
@@ -59,4 +59,5 @@ class NoopKeyguardFaceAuthInteractor @Inject constructor() : KeyguardFaceAuthInt
    override fun onNotificationPanelClicked() {}

    override fun onSwipeUpOnBouncer() {}
    override fun onPrimaryBouncerUserInput() {}
}
+4 −0
Original line number Diff line number Diff line
@@ -151,6 +151,10 @@ constructor(
        return featureFlags.isEnabled(Flags.FACE_AUTH_REFACTOR)
    }

    override fun onPrimaryBouncerUserInput() {
        repository.cancel()
    }

    /** Provide the status of face authentication */
    override val authenticationStatus = repository.authenticationStatus

Loading