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

Commit 75d9c473 authored by Nergi Rahardi's avatar Nergi Rahardi
Browse files

Skip dragging if app is already in default DesktopMode

This covers:
- PlatformScenarioTests "com.android.wm.shell.functional"
- WMShellFlickerTestsDesktopMode

Note that some tests are still failing, but this is the
first step to make sure it bypass the dragToDesktopMode
part (required in Tablet).

Bug: 378442632
Flag: EXEMPT test fix supporting default desktop mode
Test: atest PlatformScenarioTests --test-filter "com.android.wm.shell.functional"
Change-Id: I5330705db6c26b75c86eabcac368d5cbf254bebd
parent e749aa2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
        Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)
        testApp.enterDesktopWithDrag(wmHelper, device)
        testApp.enterDesktopMode(wmHelper, device)
        mailApp.launchViaIntent(wmHelper)
        nonResizeableApp.launchViaIntent(wmHelper)
    }
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ abstract class DragAppWindowMultiWindow : DragAppWindowScenarioTestBase()
    @Before
    fun setup() {
        Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
        testApp.enterDesktopWithDrag(wmHelper, device)
        testApp.enterDesktopMode(wmHelper, device)
        mailApp.launchViaIntent(wmHelper)
        newTasksApp.launchViaIntent(wmHelper)
        imeApp.launchViaIntent(wmHelper)
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ open class DragAppWindowMultiWindowAndPip : DragAppWindowScenarioTestBase()
        Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
        // Set string extra to ensure the app is on PiP mode at launch
        pipApp.launchViaIntentAndWaitForPip(wmHelper, stringExtras = mapOf("enter_pip" to "true"))
        testApp.enterDesktopWithDrag(wmHelper, device)
        testApp.enterDesktopMode(wmHelper, device)
        mailApp.launchViaIntent(wmHelper)
        newTasksApp.launchViaIntent(wmHelper)
        imeApp.launchViaIntent(wmHelper)
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ open class DragAppWindowSingleWindow : DragAppWindowScenarioTestBase()
    @Before
    fun setup() {
        Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
        testApp.enterDesktopWithDrag(wmHelper, device)
        testApp.enterDesktopMode(wmHelper, device)
    }

    @Test
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ constructor(

    @Test
    open fun enterDesktopWithDrag() {
        testApp.enterDesktopWithDrag(wmHelper, device)
        testApp.enterDesktopModeWithDrag(wmHelper, device)
    }

    @After
Loading