Loading packages/SystemUI/multivalentTests/src/com/android/systemui/notifications/ui/viewmodel/NotificationsShadeOverlayActionsViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ class NotificationsShadeOverlayActionsViewModelTest : SysuiTestCase() { underTest.activateIn(this) val action = (actions?.get(Swipe.Down(fromSource = SceneContainerArea.EndHalf)) (actions?.get(Swipe.Down(fromSource = SceneContainerArea.TopEdgeEndHalf)) as? ReplaceByOverlay) assertThat(action?.overlay).isEqualTo(Overlays.QuickSettingsShade) } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeOverlayActionsViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class QuickSettingsShadeOverlayActionsViewModelTest : SysuiTestCase() { underTest.activateIn(this) val action = (actions?.get(Swipe.Down(fromSource = SceneContainerArea.StartHalf)) (actions?.get(Swipe.Down(fromSource = SceneContainerArea.TopEdgeStartHalf)) as? ReplaceByOverlay) assertThat(action?.overlay).isEqualTo(Overlays.NotificationsShade) } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerSwipeDetectorTest.kt +19 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.LeftE import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.LeftHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.RightEdge import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.RightHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.TopEdgeLeftHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.TopEdgeRightHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.StartEdge import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.StartHalf import com.google.common.truth.Truth.assertThat Loading @@ -55,9 +57,9 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { } @Test fun source_swipeVerticallyOnTopLeft_detectsLeftHalf() { fun source_swipeVerticallyOnTopLeft_detectsTopEdgeLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(LeftHalf) assertThat(detectedEdge).isEqualTo(TopEdgeLeftHalf) } @Test Loading @@ -69,7 +71,7 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { @Test fun source_swipeVerticallyOnTopRight_detectsRightHalf() { val detectedEdge = swipeVerticallyFrom(x = screenWidth - 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(RightHalf) assertThat(detectedEdge).isEqualTo(TopEdgeRightHalf) } @Test Loading @@ -79,14 +81,26 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { } @Test fun source_swipeVerticallyToLeftOfSplit_detectsLeftHalf() { fun source_swipeVerticallyOnTopEdge_ToLeftOfSplit_detectsTopEdgeLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) - 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(TopEdgeLeftHalf) } @Test fun source_swipeVerticallyBelowTopEdge_ToLeftOfSplit_detectsLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) - 1, y = edgeSize + 1) assertThat(detectedEdge).isEqualTo(LeftHalf) } @Test fun source_swipeVerticallyToRightOfSplit_detectsRightHalf() { fun source_swipeVerticallyOnTopEdge_toRightOfSplit_detectsTopEdgeRightHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) + 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(TopEdgeRightHalf) } @Test fun source_swipeVerticallyBelowTopEdge_toRightOfSplit_detectsRightHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) + 1, y = edgeSize + 1) assertThat(detectedEdge).isEqualTo(RightHalf) } Loading packages/SystemUI/src/com/android/systemui/notifications/ui/viewmodel/NotificationsShadeOverlayActionsViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class NotificationsShadeOverlayActionsViewModel @AssistedInject constructor() : mapOf( Swipe.Up to HideOverlay(Overlays.NotificationsShade), Back to HideOverlay(Overlays.NotificationsShade), Swipe.Down(fromSource = SceneContainerArea.EndHalf) to Swipe.Down(fromSource = SceneContainerArea.TopEdgeEndHalf) to ReplaceByOverlay(Overlays.QuickSettingsShade), ) ) Loading packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeOverlayActionsViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ constructor(private val editModeViewModel: EditModeViewModel) : UserActionsViewM put(Back, HideOverlay(Overlays.QuickSettingsShade)) } put( Swipe.Down(fromSource = SceneContainerArea.StartHalf), Swipe.Down(fromSource = SceneContainerArea.TopEdgeStartHalf), ReplaceByOverlay(Overlays.NotificationsShade), ) } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/notifications/ui/viewmodel/NotificationsShadeOverlayActionsViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ class NotificationsShadeOverlayActionsViewModelTest : SysuiTestCase() { underTest.activateIn(this) val action = (actions?.get(Swipe.Down(fromSource = SceneContainerArea.EndHalf)) (actions?.get(Swipe.Down(fromSource = SceneContainerArea.TopEdgeEndHalf)) as? ReplaceByOverlay) assertThat(action?.overlay).isEqualTo(Overlays.QuickSettingsShade) } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeOverlayActionsViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class QuickSettingsShadeOverlayActionsViewModelTest : SysuiTestCase() { underTest.activateIn(this) val action = (actions?.get(Swipe.Down(fromSource = SceneContainerArea.StartHalf)) (actions?.get(Swipe.Down(fromSource = SceneContainerArea.TopEdgeStartHalf)) as? ReplaceByOverlay) assertThat(action?.overlay).isEqualTo(Overlays.NotificationsShade) } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerSwipeDetectorTest.kt +19 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.LeftE import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.LeftHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.RightEdge import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.RightHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.TopEdgeLeftHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.Resolved.TopEdgeRightHalf import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.StartEdge import com.android.systemui.scene.ui.viewmodel.SceneContainerArea.StartHalf import com.google.common.truth.Truth.assertThat Loading @@ -55,9 +57,9 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { } @Test fun source_swipeVerticallyOnTopLeft_detectsLeftHalf() { fun source_swipeVerticallyOnTopLeft_detectsTopEdgeLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(LeftHalf) assertThat(detectedEdge).isEqualTo(TopEdgeLeftHalf) } @Test Loading @@ -69,7 +71,7 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { @Test fun source_swipeVerticallyOnTopRight_detectsRightHalf() { val detectedEdge = swipeVerticallyFrom(x = screenWidth - 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(RightHalf) assertThat(detectedEdge).isEqualTo(TopEdgeRightHalf) } @Test Loading @@ -79,14 +81,26 @@ class SceneContainerSwipeDetectorTest : SysuiTestCase() { } @Test fun source_swipeVerticallyToLeftOfSplit_detectsLeftHalf() { fun source_swipeVerticallyOnTopEdge_ToLeftOfSplit_detectsTopEdgeLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) - 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(TopEdgeLeftHalf) } @Test fun source_swipeVerticallyBelowTopEdge_ToLeftOfSplit_detectsLeftHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) - 1, y = edgeSize + 1) assertThat(detectedEdge).isEqualTo(LeftHalf) } @Test fun source_swipeVerticallyToRightOfSplit_detectsRightHalf() { fun source_swipeVerticallyOnTopEdge_toRightOfSplit_detectsTopEdgeRightHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) + 1, y = edgeSize - 1) assertThat(detectedEdge).isEqualTo(TopEdgeRightHalf) } @Test fun source_swipeVerticallyBelowTopEdge_toRightOfSplit_detectsRightHalf() { val detectedEdge = swipeVerticallyFrom(x = (screenWidth / 2) + 1, y = edgeSize + 1) assertThat(detectedEdge).isEqualTo(RightHalf) } Loading
packages/SystemUI/src/com/android/systemui/notifications/ui/viewmodel/NotificationsShadeOverlayActionsViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class NotificationsShadeOverlayActionsViewModel @AssistedInject constructor() : mapOf( Swipe.Up to HideOverlay(Overlays.NotificationsShade), Back to HideOverlay(Overlays.NotificationsShade), Swipe.Down(fromSource = SceneContainerArea.EndHalf) to Swipe.Down(fromSource = SceneContainerArea.TopEdgeEndHalf) to ReplaceByOverlay(Overlays.QuickSettingsShade), ) ) Loading
packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsShadeOverlayActionsViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ constructor(private val editModeViewModel: EditModeViewModel) : UserActionsViewM put(Back, HideOverlay(Overlays.QuickSettingsShade)) } put( Swipe.Down(fromSource = SceneContainerArea.StartHalf), Swipe.Down(fromSource = SceneContainerArea.TopEdgeStartHalf), ReplaceByOverlay(Overlays.NotificationsShade), ) } Loading