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

Commit e3f0f7c6 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED when occluded

As it turns out, SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED needs to be
false when system UI is occluded.

To make sure of this, I compared the output of
adb shell dumpsys activity service com.android.systemui/.SystemUIService SysUiState | grep backGestureDisabled
when the camera app is occluding system UI in pre-Flexiglass to Flexiglass.

By having it be false, the back navigation works when the camera app is
occluding system UI.

Bug: 349438272
Test: added unit tests expanded
Test: manually verified that back navigation worked while the camera app
was occluding system UI.
Flag: com.android.systemui.scene_container

Change-Id: I3606a217c05365636258690e253096ec98cf9983
parent 5b4ccd58
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -486,6 +486,11 @@ class SceneContainerStartableTest : SysuiTestCase() {
                        QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING != 0L
                )
                .isFalse()
            assertThat(
                    sysUiState.flags and
                        QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED != 0L
                )
                .isFalse()

            kosmos.keyguardOcclusionInteractor.setWmNotifiedShowWhenLockedActivityOnTop(false)
            runCurrent()
@@ -499,6 +504,11 @@ class SceneContainerStartableTest : SysuiTestCase() {
                        QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING != 0L
                )
                .isTrue()
            assertThat(
                    sysUiState.flags and
                        QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED != 0L
                )
                .isTrue()
        }

    @Test
+7 −3
Original line number Diff line number Diff line
@@ -84,9 +84,13 @@ constructor(
                SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE to { it.scene != Scenes.Gone },
                SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED to
                    {
                        it.scene == Scenes.Lockscreen ||
                            it.scene == Scenes.NotificationsShade ||
                            it.scene == Scenes.Shade
                        when {
                            it.invisibleDueToOcclusion -> false
                            it.scene == Scenes.Lockscreen -> true
                            it.scene == Scenes.NotificationsShade -> true
                            it.scene == Scenes.Shade -> true
                            else -> false
                        }
                    },
                SYSUI_STATE_QUICK_SETTINGS_EXPANDED to
                    {