diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/EnterLegacySplitScreenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/EnterLegacySplitScreenTest.kt index 5b9091fa7c039..277efa911dba0 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/EnterLegacySplitScreenTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/EnterLegacySplitScreenTest.kt @@ -27,6 +27,7 @@ import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.isInSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.openQuickstep +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.wm.shell.flicker.dockedStackDividerIsInvisible import com.android.wm.shell.flicker.helpers.SplitScreenHelper.Companion.TEST_REPETITIONS @@ -67,6 +68,7 @@ class EnterLegacySplitScreenTest( setup { eachRun { uiDevice.wakeUpAndGoToHomeScreen() + uiDevice.openQuickStepAndClearRecentAppsFromOverview() } } teardown { diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ExitLegacySplitScreenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ExitLegacySplitScreenTest.kt index be7faf61890dd..c51c73a9e2487 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ExitLegacySplitScreenTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ExitLegacySplitScreenTest.kt @@ -30,8 +30,11 @@ import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.dsl.runWithFlicker import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.resizeSplitScreen import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen +import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible +import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible import com.android.wm.shell.flicker.dockedStackDividerIsInvisible import com.android.wm.shell.flicker.helpers.SplitScreenHelper.Companion.TEST_REPETITIONS import org.junit.FixMethodOrder @@ -61,10 +64,9 @@ class ExitLegacySplitScreenTest( setup { eachRun { uiDevice.wakeUpAndGoToHomeScreen() - secondaryApp.open() - uiDevice.pressHome() - splitScreenApp.open() - uiDevice.pressHome() + uiDevice.openQuickStepAndClearRecentAppsFromOverview() + secondaryApp.launchViaIntent() + splitScreenApp.launchViaIntent() uiDevice.launchSplitScreen() } } @@ -150,4 +152,4 @@ class ExitLegacySplitScreenTest( return supportedRotations.map { arrayOf(Surface.rotationToString(it), it) } } } -} \ No newline at end of file +} diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncherTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncherTest.kt index f8df0e1cd3e07..629c71fa74e59 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncherTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncherTest.kt @@ -31,6 +31,7 @@ import com.android.server.wm.flicker.helpers.buildTestTag import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.isInSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible @@ -82,6 +83,7 @@ class LegacySplitScreenToLauncherTest( setup { test { device.wakeUpAndGoToHomeScreen() + device.openQuickStepAndClearRecentAppsFromOverview() } eachRun { testApp.open() diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/OpenAppToLegacySplitScreenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/OpenAppToLegacySplitScreenTest.kt index 134461adf57b3..af038698de800 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/OpenAppToLegacySplitScreenTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/OpenAppToLegacySplitScreenTest.kt @@ -24,13 +24,14 @@ import androidx.test.platform.app.InstrumentationRegistry import com.android.server.wm.flicker.Flicker import com.android.server.wm.flicker.FlickerTestRunner import com.android.server.wm.flicker.FlickerTestRunnerFactory -import com.android.server.wm.flicker.endRotation import com.android.server.wm.flicker.helpers.StandardAppHelper +import com.android.server.wm.flicker.endRotation import com.android.server.wm.flicker.focusChanges import com.android.server.wm.flicker.helpers.buildTestTag import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.isInSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible @@ -83,6 +84,7 @@ class OpenAppToLegacySplitScreenTest( setup { test { device.wakeUpAndGoToHomeScreen() + device.openQuickStepAndClearRecentAppsFromOverview() } eachRun { testApp.open() diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppTest.kt index ae2200ca59091..923f2a4cd7575 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppTest.kt @@ -23,6 +23,7 @@ import com.android.server.wm.flicker.dsl.runWithFlicker import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.isInSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible @@ -56,7 +57,8 @@ class RotateOneLaunchedAppTest( } setup { test { - device.wakeUpAndGoToHomeScreen() + uiDevice.wakeUpAndGoToHomeScreen() + uiDevice.openQuickStepAndClearRecentAppsFromOverview() } } teardown { @@ -81,7 +83,7 @@ class RotateOneLaunchedAppTest( } transitions { splitScreenApp.launchViaIntent() - device.launchSplitScreen() + uiDevice.launchSplitScreen() setRotation(rotation) } assertions { @@ -114,7 +116,7 @@ class RotateOneLaunchedAppTest( transitions { splitScreenApp.launchViaIntent() setRotation(rotation) - device.launchSplitScreen() + uiDevice.launchSplitScreen() } assertions { layersTrace { diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppTest.kt index a1b44f0da6acf..4578f687689c4 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppTest.kt @@ -23,6 +23,7 @@ import com.android.server.wm.flicker.dsl.runWithFlicker import com.android.server.wm.flicker.helpers.exitSplitScreen import com.android.server.wm.flicker.helpers.isInSplitScreen import com.android.server.wm.flicker.helpers.launchSplitScreen +import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible @@ -57,7 +58,8 @@ class RotateTwoLaunchedAppTest( } setup { test { - device.wakeUpAndGoToHomeScreen() + uiDevice.wakeUpAndGoToHomeScreen() + uiDevice.openQuickStepAndClearRecentAppsFromOverview() } } teardown { @@ -83,7 +85,7 @@ class RotateTwoLaunchedAppTest( transitions { secondaryApp.launchViaIntent() splitScreenApp.launchViaIntent() - device.launchSplitScreen() + uiDevice.launchSplitScreen() splitScreenApp.reopenAppFromOverview() setRotation(rotation) } @@ -121,7 +123,7 @@ class RotateTwoLaunchedAppTest( secondaryApp.launchViaIntent() splitScreenApp.launchViaIntent() setRotation(rotation) - device.launchSplitScreen() + uiDevice.launchSplitScreen() splitScreenApp.reopenAppFromOverview() } assertions {