Merge "Fix metro clock animation triggers twice when going to AOD" into main
diff --git a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
index 8a18efc..70182c1 100644
--- a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
+++ b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
@@ -544,7 +544,9 @@
step.copy(value = 1f - step.value)
},
keyguardTransitionInteractor.lockscreenToAodTransition,
- )
+ ).filter {
+ it.transitionState != TransitionState.FINISHED
+ }
.collect { handleDoze(it.value) }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
index 6a35340..ca55dd8 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
@@ -330,7 +330,8 @@
TransitionStep(
from = KeyguardState.LOCKSCREEN,
to = KeyguardState.AOD,
- value = 0.4f
+ value = 0.4f,
+ transitionState = TransitionState.RUNNING,
)
yield()