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

Commit 4237d5cf authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

The AlternateBouncer doesn't require forcePluginOpen; remove it

The AlternateBouncer view lives in its own window, so
it no longer needs to track forcing the notification
shade open in order to show.

Fixes: 357832937
Flag: EXEMPT bugfix
Test: atest AlternateBouncerViewModelTest
Change-Id: Icad1d510c42d2c4aa94c479aa10e2c382aca3158
parent a5971de4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -42,9 +42,6 @@ constructor(
    val transitionToAlternateBouncerProgress =
        keyguardTransitionInteractor.transitionValue(ALTERNATE_BOUNCER)

    val forcePluginOpen: Flow<Boolean> =
        transitionToAlternateBouncerProgress.map { it > 0f }.distinctUntilChanged()

    /** An observable for the scrim alpha. */
    val scrimAlpha = transitionToAlternateBouncerProgress.map { it * alternateBouncerScrimAlpha }

+0 −28
Original line number Diff line number Diff line
@@ -101,34 +101,6 @@ class AlternateBouncerViewModelTest : SysuiTestCase() {
            scrimAlphas.forEach { assertThat(it).isIn(Range.closed(0f, 1f)) }
        }

    @Test
    fun forcePluginOpen() =
        testScope.runTest {
            val forcePluginOpen by collectLastValue(underTest.forcePluginOpen)

            transitionRepository.sendTransitionSteps(
                listOf(
                    stepToAlternateBouncer(0f, TransitionState.STARTED),
                    stepToAlternateBouncer(.4f),
                    stepToAlternateBouncer(.6f),
                    stepToAlternateBouncer(1f),
                ),
                testScope,
            )
            assertThat(forcePluginOpen).isTrue()

            transitionRepository.sendTransitionSteps(
                listOf(
                    stepFromAlternateBouncer(0f, TransitionState.STARTED),
                    stepFromAlternateBouncer(.3f),
                    stepFromAlternateBouncer(.6f),
                    stepFromAlternateBouncer(1f),
                ),
                testScope,
            )
            assertThat(forcePluginOpen).isFalse()
        }

    @Test
    fun registerForDismissGestures() =
        testScope.runTest {