summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly Tai <beverlyt@google.com> 2024-04-09 13:55:47 +0000
committer Beverly <beverlyt@google.com> 2024-04-09 13:57:51 +0000
commit9fbdacf8bebd69a596550764cb1bff8b5c8f1bff (patch)
treeb359238cb7a332fe024b619c512a4435f2b720ac
parentecad616a5da71b0c69a5b734e6aa26fbc9fe15b9 (diff)
Revert "Reset the face authenticated state when transitioning to GONE"
This reverts commit 48f82c23a19641149e3ad32a1187e643006a8838. Reason for revert: b/333404879 Fixes: 333404879 Bug: 330117158 Change-Id: Ib2f0615a30019ac40412d48b11c6ca5b79bec5b0
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt7
2 files changed, 8 insertions, 9 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
index 9a13bb261aa7..36919d0c74a4 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
@@ -827,7 +827,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
}
@Test
- fun isAuthenticatedIsResetToFalseWhenTransitioningToGone() =
+ fun isAuthenticatedIsResetToFalseWhenKeyguardDoneAnimationsFinished() =
testScope.runTest {
initCollectors()
allPreconditionsToRunFaceAuthAreTrue()
@@ -840,13 +840,7 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
assertThat(authenticated()).isTrue()
- keyguardTransitionRepository.sendTransitionStep(
- TransitionStep(
- transitionState = TransitionState.STARTED,
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.GONE,
- )
- )
+ keyguardRepository.keyguardDoneAnimationsFinished()
assertThat(authenticated()).isFalse()
}
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
index 0e04d15d8680..baae986c494d 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
@@ -40,6 +40,7 @@ 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
@@ -312,7 +313,11 @@ constructor(
// or device starts going to sleep.
merge(
powerInteractor.isAsleep,
- keyguardTransitionInteractor.isInTransitionToState(KeyguardState.GONE),
+ if (KeyguardWmStateRefactor.isEnabled) {
+ keyguardTransitionInteractor.isInTransitionToState(KeyguardState.GONE)
+ } else {
+ keyguardRepository.keyguardDoneAnimationsFinished.map { true }
+ },
userRepository.selectedUser.map {
it.selectionStatus == SelectionStatus.SELECTION_IN_PROGRESS
},