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

Commit f632c4d9 authored by Beverly's avatar Beverly Committed by Automerger Merge Worker
Browse files

Don't run face auth (non-bypass) on a dismissible keyguard am: 5e4aba32

parents fa123039 5e4aba32
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -654,7 +654,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
        }

    @Test
    fun authenticateFallbacksToDetectionWhenUserIsAlreadyTrustedByTrustManager() =
    fun authenticateFallbacksToDetectionWhenKeyguardIsAlreadyDismissible() =
        testScope.runTest {
            whenever(faceManager.sensorPropertiesInternal)
                .thenReturn(listOf(createFaceSensorProperties(supportsFaceDetection = true)))
@@ -663,7 +663,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
            initCollectors()
            allPreconditionsToRunFaceAuthAreTrue()

            trustRepository.setCurrentUserTrusted(true)
            keyguardRepository.setKeyguardDismissible(true)
            assertThat(canFaceAuthRun()).isFalse()
            underTest.requestAuthenticate(
                FACE_AUTH_TRIGGERED_SWIPE_UP_ON_BOUNCER,
+5 −2
Original line number Diff line number Diff line
@@ -250,7 +250,10 @@ constructor(
            listOf(
                    *gatingConditionsForAuthAndDetect(),
                    Pair(isLockedOut.isFalse(), "isNotInLockOutState"),
                    Pair(trustRepository.isCurrentUserTrusted.isFalse(), "currentUserIsNotTrusted"),
                    Pair(
                        keyguardRepository.isKeyguardDismissible.isFalse(),
                        "keyguardIsNotDismissible"
                    ),
                    Pair(
                        biometricSettingsRepository.isFaceAuthCurrentlyAllowed,
                        "isFaceAuthCurrentlyAllowed"
@@ -273,7 +276,7 @@ constructor(
                    Pair(
                        biometricSettingsRepository.isFaceAuthCurrentlyAllowed
                            .isFalse()
                            .or(trustRepository.isCurrentUserTrusted),
                            .or(keyguardRepository.isKeyguardDismissible),
                        "faceAuthIsNotCurrentlyAllowedOrCurrentUserIsTrusted"
                    ),
                    // We don't want to run face detect if fingerprint can be used to unlock the