Do not run face auth if keyguard is already authenticated with face.

Fixes: 285518497
Test: atest DeviceEntryFaceAuthRepositoryTest
Change-Id: I2536ae302b6b7d240e931b51698ac125bd1668ea
This commit is contained in:
Chandru S
2023-06-23 10:32:06 -07:00
parent 37b214b8c6
commit 9296cf0a50
2 changed files with 2 additions and 0 deletions

View File

@@ -365,6 +365,7 @@ constructor(
"nonStrongBiometricIsAllowed",
faceAuthLog
),
logAndObserve(isAuthenticated.isFalse(), "faceNotAuthenticated", faceAuthLog),
)
.reduce(::and)
.distinctUntilChanged()

View File

@@ -260,6 +260,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
assertThat(authStatus()).isEqualTo(SuccessAuthenticationStatus(successResult))
assertThat(authenticated()).isTrue()
assertThat(authRunning()).isFalse()
assertThat(canFaceAuthRun()).isFalse()
}
private fun uiEventIsLogged(faceAuthUiEvent: FaceAuthUiEvent) {