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

Commit 1e28865a authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "[Flexiglass] Don't allow NSSL scrolling on the LS" into main

parents 3ed7c2ad 3422331f
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
        }