commit | 9296cf0a50d9986d4c1dcfb98f7a7ba9ebd8e7d0 | [log] [tgz] |
---|---|---|
author | Chandru S <chandruis@google.com> | Fri Jun 23 10:32:06 2023 -0700 |
committer | Chandru S <chandruis@google.com> | Mon Jun 26 15:53:50 2023 +0000 |
tree | f3d99e3aba11e05dfa22a8a02322f17490ac422d | |
parent | 37b214b8c61342f99c342bc3e68b953ddf452f74 [diff] |
Do not run face auth if keyguard is already authenticated with face. Fixes: 285518497 Test: atest DeviceEntryFaceAuthRepositoryTest Change-Id: I2536ae302b6b7d240e931b51698ac125bd1668ea
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt index b17661d..197929c 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
@@ -365,6 +365,7 @@ "nonStrongBiometricIsAllowed", faceAuthLog ), + logAndObserve(isAuthenticated.isFalse(), "faceNotAuthenticated", faceAuthLog), ) .reduce(::and) .distinctUntilChanged()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt index 8e6adb4..9eef793 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
@@ -260,6 +260,7 @@ assertThat(authStatus()).isEqualTo(SuccessAuthenticationStatus(successResult)) assertThat(authenticated()).isTrue() assertThat(authRunning()).isFalse() + assertThat(canFaceAuthRun()).isFalse() } private fun uiEventIsLogged(faceAuthUiEvent: FaceAuthUiEvent) {