Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9a3db0b authored by Josh Tsuji's avatar Josh Tsuji Committed by Android (Google) Code Review
Browse files

Merge "Restore unflagged debounce(50)." into main

parents 38715c7c e5014d6f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -322,7 +322,12 @@ class FromAodTransitionInteractorTest : SysuiTestCase() {
            powerInteractor.setAwakeForTest()
            runCurrent()

            // Waking up from wake and unlock should not start any transitions, we'll wait for the
            // dismiss call.
            assertThat(transitionRepository).noTransitionsStarted()

            underTest.dismissAod()
            advanceTimeBy(100) // account for debouncing

            assertThat(transitionRepository)
                .startedTransition(from = KeyguardState.AOD, to = KeyguardState.GONE)
+4 −2
Original line number Diff line number Diff line
@@ -93,11 +93,13 @@ constructor(
        // transition.
        scope.launch("$TAG#listenForAodToAwake") {
            powerInteractor.detailedWakefulness
                .apply {
                .let { flow ->
                    if (!KeyguardWmStateRefactor.isEnabled) {
                        // This works around some timing issues pre-refactor that are no longer an
                        // issue (and this causes problems with the flag enabled).
                        debounce(50L)
                        flow.debounce(50L)
                    } else {
                        flow
                    }
                }
                .filterRelevantKeyguardStateAnd { wakefulness -> wakefulness.isAwake() }