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

Commit 5c49ad48 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Changes Lockscreen's Swipe.Left to Swipe.Start

To make it RTL friendly.

Fix: 370048816
Test: unit tests updated
Flag: com.android.systemui.scene_container
Change-Id: Ic8538604a6371a33a1c600045f69b7497b8091b3
parent 2bd406ba
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() {
            }
        }

        private fun expectedLeftDestination(
        private fun expectedStartDestination(
            isCommunalAvailable: Boolean,
            isShadeTouchable: Boolean,
        ): SceneKey? {
@@ -246,17 +246,17 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() {
                    )
                )

            val leftScene by
            val startScene by
                collectLastValue(
                    (userActions?.get(Swipe.Left) as? UserActionResult.ChangeScene)?.toScene?.let {
                        scene ->
                        kosmos.sceneInteractor.resolveSceneFamily(scene)
                    } ?: flowOf(null)
                    (userActions?.get(Swipe.Start) as? UserActionResult.ChangeScene)
                        ?.toScene
                        ?.let { scene -> kosmos.sceneInteractor.resolveSceneFamily(scene) }
                        ?: flowOf(null)
                )

            assertThat(leftScene)
            assertThat(startScene)
                .isEqualTo(
                    expectedLeftDestination(
                    expectedStartDestination(
                        isCommunalAvailable = isCommunalAvailable,
                        isShadeTouchable = isShadeTouchable,
                    )
@@ -341,17 +341,17 @@ class LockscreenUserActionsViewModelTest : SysuiTestCase() {
                    )
                )

            val leftScene by
            val startScene by
                collectLastValue(
                    (userActions?.get(Swipe.Left) as? UserActionResult.ChangeScene)?.toScene?.let {
                        scene ->
                        kosmos.sceneInteractor.resolveSceneFamily(scene)
                    } ?: flowOf(null)
                    (userActions?.get(Swipe.Start) as? UserActionResult.ChangeScene)
                        ?.toScene
                        ?.let { scene -> kosmos.sceneInteractor.resolveSceneFamily(scene) }
                        ?: flowOf(null)
                )

            assertThat(leftScene)
            assertThat(startScene)
                .isEqualTo(
                    expectedLeftDestination(
                    expectedStartDestination(
                        isCommunalAvailable = isCommunalAvailable,
                        isShadeTouchable = isShadeTouchable,
                    )
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ constructor(
                ) { isDeviceUnlocked, isCommunalAvailable, shadeMode ->
                    buildList {
                            if (isCommunalAvailable) {
                                add(Swipe.Left to Scenes.Communal)
                                add(Swipe.Start to Scenes.Communal)
                            }

                            add(Swipe.Up to if (isDeviceUnlocked) Scenes.Gone else Scenes.Bouncer)