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

Commit e5014d6f authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Restore unflagged debounce(50).

Apply returns the original flow, so the debounce has no effect. Whoops.

Bug: 278086361
Test: atest SystemUITests
Flag: EXEMPT bugfix
Change-Id: Ic1e3c386fa5b39a21be3bcc21ead449773757c16
parent 780acdef
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() }