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

Commit adb32da2 authored by Darrell Shi's avatar Darrell Shi
Browse files

Do not change scene when launching edit mode in STF

When scene container is disabled, the communal scene is rendered in
notifications shade over everything so needs to be hidden when edit mode
is launched. With scene container, hidding the scene container is
handled by STF so we do not need to manually do it.

Test: verified that edit mode is started correctly
Test: verified that upon dismissing edit mode, the screen goes back to
      GH. The device is however not locked which is tracked at b/365596274
Bug: 356141092
Flag: com.android.systemui.scene_container
Change-Id: I1bb8fdf7bcaa49f58f9c1296941396801e9e20f7
parent ade62c4e
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.Logger
import com.android.systemui.log.dagger.CommunalLog
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import javax.inject.Inject
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
@@ -244,6 +245,7 @@ constructor(
    private fun listenForTransitionAndChangeScene() {
        lifecycleScope.launch {
            communalViewModel.canShowEditMode.collect {
                if (!SceneContainerFlag.isEnabled) {
                    communalViewModel.changeScene(
                        scene = CommunalScenes.Blank,
                        loggingReason = "edit mode opening",
@@ -253,6 +255,8 @@ constructor(
                    // wait till transitioned to Blank scene, then animate in communal content in
                    // edit mode
                    communalViewModel.currentScene.first { it == CommunalScenes.Blank }
                }

                communalViewModel.setEditModeState(EditModeState.SHOWING)

                // Inform the ActivityController that we are now fully visible.