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

Commit 48f82c23 authored by Beverly's avatar Beverly
Browse files

Reset the face authenticated state when transitioning to GONE

Fixes: 330117158
Flag: NONE
Test: atest DeviceEntryFaceAuthRepositoryTest
Test: After a successful face auth for device entry,
insert a SIM that requires PIN. Observe the SIM PIN
screen shows immediately.

Change-Id: I96ecfad9d2214e12516d9c30634c211bfcc77b3a
parent 5a0f5ab3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -827,7 +827,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
        }

    @Test
    fun isAuthenticatedIsResetToFalseWhenKeyguardDoneAnimationsFinished() =
    fun isAuthenticatedIsResetToFalseWhenTransitioningToGone() =
        testScope.runTest {
            initCollectors()
            allPreconditionsToRunFaceAuthAreTrue()
@@ -840,7 +840,13 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {

            assertThat(authenticated()).isTrue()

            keyguardRepository.keyguardDoneAnimationsFinished()
            keyguardTransitionRepository.sendTransitionStep(
                TransitionStep(
                    transitionState = TransitionState.STARTED,
                    from = KeyguardState.LOCKSCREEN,
                    to = KeyguardState.GONE,
                )
            )

            assertThat(authenticated()).isFalse()
        }
+1 −6
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import com.android.systemui.deviceentry.shared.model.FailedFaceAuthenticationSta
import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.SuccessFaceAuthenticationStatus
import com.android.systemui.dump.DumpManager
import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.data.repository.BiometricSettingsRepository
import com.android.systemui.keyguard.data.repository.BiometricType
import com.android.systemui.keyguard.data.repository.DeviceEntryFingerprintAuthRepository
@@ -313,11 +312,7 @@ constructor(
        // or device starts going to sleep.
        merge(
                powerInteractor.isAsleep,
                if (KeyguardWmStateRefactor.isEnabled) {
                    keyguardTransitionInteractor.isInTransitionToState(KeyguardState.GONE)
                } else {
                    keyguardRepository.keyguardDoneAnimationsFinished.map { true }
                },
                keyguardTransitionInteractor.isInTransitionToState(KeyguardState.GONE),
                userRepository.selectedUser.map {
                    it.selectionStatus == SelectionStatus.SELECTION_IN_PROGRESS
                },