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

Commit f1384baa authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Revert "Fix glanceable hub screen not getting blurred based on whether bouncer is showing or not"

This reverts commit f4cc6c20.

Reason for revert: b/439949607

Bug: 388068805
Change-Id: I9ac461a553996079b1cc75690f84a0588cbee5d9
parent f4cc6c20
Loading
Loading
Loading
Loading
+1 −23
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ import com.android.systemui.scene.data.repository.Transition
import com.android.systemui.scene.data.repository.setTransition
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Overlays
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.fakeUserTracker
import com.android.systemui.shade.domain.interactor.shadeInteractor
@@ -948,32 +947,11 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
        kosmos.runTest {
            val viewModel = createViewModel()
            val isUiBlurred by collectLastValue(viewModel.isUiBlurred)
            kosmos.sceneInteractor.changeScene(
                Scenes.Lockscreen,
                "go to lockscreen",
                hideAllOverlays = false,
            )
            kosmos.sceneInteractor.instantlyShowOverlay(Overlays.Bouncer, "go to bouncer")
            kosmos.sceneInteractor.setTransitionState(
                flowOf(
                    ObservableTransitionState.Idle(
                        sceneInteractor.currentScene.value,
                        setOf(Overlays.Bouncer),
                    )
                )
            )
            fakeKeyguardBouncerRepository.setPrimaryShow(true)
            runCurrent()

            fakeKeyguardBouncerRepository.setPrimaryShow(true)
            assertThat(isUiBlurred).isTrue()

            fakeKeyguardBouncerRepository.setPrimaryShow(false)
            kosmos.sceneInteractor.instantlyHideOverlay(Overlays.Bouncer, "go to bouncer")
            kosmos.sceneInteractor.setTransitionState(
                flowOf(ObservableTransitionState.Idle(sceneInteractor.currentScene.value))
            )
            runCurrent()

            assertThat(isUiBlurred).isFalse()
        }

+5 −12
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import com.android.systemui.log.table.logDiffsForTable
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Overlays
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.shade.data.repository.ShadeRepository
@@ -279,18 +278,12 @@ constructor(
    /** Whether the primary bouncer is showing or about to show soon. */
    @JvmField
    val primaryBouncerShowing: StateFlow<Boolean> =
        if (SceneContainerFlag.isEnabled) {
                sceneInteractorProvider.get().transitionState.map {
                    it.isIdle(Overlays.Bouncer) || it.isTransitioning(to = Overlays.Bouncer)
                }
            } else {
        combine(
                bouncerRepository.primaryBouncerShow,
                bouncerRepository.primaryBouncerShowingSoon,
            ) { showing, showingSoon ->
                showing || showingSoon
            }
            }
            .stateIn(
                scope = applicationScope,
                started = SharingStarted.WhileSubscribed(),