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

Commit 3422331f authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Don't allow NSSL scrolling on the LS

The NSSL was swallowing all touch events in the empty area of the
Placeholder, because it thought that "the scroller wants it". All
scrolling logic should be disabled for the NSSL on the LockScreen.

Bug: 414396116
Test: long tap the empty area in the LS -> wallpaper toast appears
Flag: com.android.systemui.scene_container

Change-Id: Icf81a9b97fde4944c4bd68742e2b095d0a75bffc
parent 151c0f2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ class NotificationStackAppearanceIntegrationTest : SysuiTestCase() {

            fakeSceneDataSource.changeScene(toScene = Scenes.Lockscreen)
            val isScrollable by collectLastValue(scrollViewModel.isScrollable)
            assertThat(isScrollable).isTrue()
            assertThat(isScrollable).isFalse()
        }

    @Test
+3 −3
Original line number Diff line number Diff line
@@ -331,7 +331,8 @@ constructor(
        combine(sceneInteractor.currentScene, sceneInteractor.currentOverlays) {
                currentScene,
                currentOverlays ->
                currentScene.showsNotifications() || currentOverlays.any { it.showsNotifications() }
                currentScene.showsScrollableStack() ||
                    currentOverlays.any { it.showsScrollableStack() }
            }
            .dumpWhileCollecting("isScrollable")

@@ -361,10 +362,9 @@ constructor(
        }
    }

    private fun ContentKey.showsNotifications(): Boolean {
    private fun ContentKey.showsScrollableStack(): Boolean {
        return when (this) {
            Overlays.NotificationsShade,
            Scenes.Lockscreen,
            Scenes.Shade -> true
            else -> false
        }