Revert "Fix clock staying in AOD state in LS when transitioning from bouncer and camera"

This reverts commit 8ab059aa4710b55c234005718b85f0ff07d3b9f6.

Reason for revert: b/333610414

Change-Id: Ia60e23ccfaefd4c6955f3fd2776d127fd1bc49b3
diff --git a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
index eca932c..70182c1 100644
--- a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
+++ b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
@@ -432,7 +432,6 @@
                     if (MigrateClocksToBlueprint.isEnabled) {
                         listenForDozeAmountTransition(this)
                         listenForAnyStateToAodTransition(this)
-                        listenForAnyStateToLockscreenTransition(this)
                     } else {
                         listenForDozeAmount(this)
                     }
@@ -567,17 +566,6 @@
     }
 
     @VisibleForTesting
-    internal fun listenForAnyStateToLockscreenTransition(scope: CoroutineScope): Job {
-        return scope.launch("$TAG#listenForAnyStateToLockscreenTransition") {
-            keyguardTransitionInteractor
-                    .transitionStepsToState(LOCKSCREEN)
-                    .filter { it.transitionState == TransitionState.STARTED }
-                    .filter { it.from != AOD }
-                    .collect { handleDoze(0f) }
-        }
-    }
-
-    @VisibleForTesting
     internal fun listenForDozing(scope: CoroutineScope): Job {
         return scope.launch("$TAG#listenForDozing") {
             combine(
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
index 9a83311..ca55dd8 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
@@ -362,27 +362,6 @@
         }
 
     @Test
-    fun listenForTransitionToLSFromOccluded_updatesClockDozeAmountToOne() =
-        runBlocking(IMMEDIATE) {
-            val transitionStep = MutableStateFlow(TransitionStep())
-            whenever(keyguardTransitionInteractor.transitionStepsToState(KeyguardState.LOCKSCREEN))
-                    .thenReturn(transitionStep)
-
-            val job = underTest.listenForAnyStateToLockscreenTransition(this)
-            transitionStep.value =
-                    TransitionStep(
-                            from = KeyguardState.OCCLUDED,
-                            to = KeyguardState.LOCKSCREEN,
-                            transitionState = TransitionState.STARTED,
-                    )
-            yield()
-
-            verify(animations, times(2)).doze(0f)
-
-            job.cancel()
-        }
-
-    @Test
     fun listenForTransitionToAodFromLockscreen_neverUpdatesClockDozeAmount() =
         runBlocking(IMMEDIATE) {
             val transitionStep = MutableStateFlow(TransitionStep())
@@ -400,27 +379,6 @@
 
             verify(animations, never()).doze(1f)
 
-                job.cancel()
-            }
-
-    @Test
-    fun listenForAnyStateToLockscreenTransition_neverUpdatesClockDozeAmount() =
-        runBlocking(IMMEDIATE) {
-            val transitionStep = MutableStateFlow(TransitionStep())
-            whenever(keyguardTransitionInteractor.transitionStepsToState(KeyguardState.LOCKSCREEN))
-                    .thenReturn(transitionStep)
-
-            val job = underTest.listenForAnyStateToLockscreenTransition(this)
-            transitionStep.value =
-                    TransitionStep(
-                            from = KeyguardState.AOD,
-                            to = KeyguardState.LOCKSCREEN,
-                            transitionState = TransitionState.STARTED,
-                    )
-            yield()
-
-            verify(animations, never()).doze(0f)
-
             job.cancel()
         }