Loading libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromAnotherApp.kt +1 −0 Original line number Diff line number Diff line Loading @@ -66,5 +66,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } } libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromHome.kt +1 −0 Original line number Diff line number Diff line Loading @@ -65,5 +65,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } } libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromRecent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,5 +68,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } } libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBetweenSplitPairs.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,5 +68,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { secondaryApp.exit(wmHelper) thirdApp.exit(wmHelper) fourthApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } } libs/WindowManager/Shell/tests/e2e/utils/src/com/android/wm/shell/Utils.kt +16 −0 Original line number Diff line number Diff line Loading @@ -28,7 +28,10 @@ import android.tools.flicker.rules.ArtifactSaverRule import android.tools.flicker.rules.ChangeDisplayOrientationRule import android.tools.flicker.rules.LaunchAppRule import android.tools.flicker.rules.RemoveAllTasksButHomeRule import android.util.Log import androidx.test.platform.app.InstrumentationRegistry import androidx.test.uiautomator.UiDevice import java.io.IOException import org.junit.rules.RuleChain object Utils { Loading @@ -52,4 +55,17 @@ object Utils { .around(PressHomeRule()) .around(EnsureDeviceSettingsRule()) } /** * Resets the frozen recent tasks list (ie. commits the quickswitch to the current task and * reorders the current task to the end of the recents list). */ fun resetFreezeRecentTaskList() { try { UiDevice.getInstance(instrumentation) .executeShellCommand("wm reset-freeze-recent-tasks") } catch (e: IOException) { Log.e("TestUtils", "Failed to reset frozen recent tasks list", e) } } } Loading
libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromAnotherApp.kt +1 −0 Original line number Diff line number Diff line Loading @@ -66,5 +66,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } }
libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromHome.kt +1 −0 Original line number Diff line number Diff line Loading @@ -65,5 +65,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } }
libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBackToSplitFromRecent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,5 +68,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { fun teardown() { primaryApp.exit(wmHelper) secondaryApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } }
libs/WindowManager/Shell/tests/e2e/splitscreen/scenarios/src/com/android/wm/shell/scenarios/SwitchBetweenSplitPairs.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,5 +68,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) { secondaryApp.exit(wmHelper) thirdApp.exit(wmHelper) fourthApp.exit(wmHelper) Utils.resetFreezeRecentTaskList() } }
libs/WindowManager/Shell/tests/e2e/utils/src/com/android/wm/shell/Utils.kt +16 −0 Original line number Diff line number Diff line Loading @@ -28,7 +28,10 @@ import android.tools.flicker.rules.ArtifactSaverRule import android.tools.flicker.rules.ChangeDisplayOrientationRule import android.tools.flicker.rules.LaunchAppRule import android.tools.flicker.rules.RemoveAllTasksButHomeRule import android.util.Log import androidx.test.platform.app.InstrumentationRegistry import androidx.test.uiautomator.UiDevice import java.io.IOException import org.junit.rules.RuleChain object Utils { Loading @@ -52,4 +55,17 @@ object Utils { .around(PressHomeRule()) .around(EnsureDeviceSettingsRule()) } /** * Resets the frozen recent tasks list (ie. commits the quickswitch to the current task and * reorders the current task to the end of the recents list). */ fun resetFreezeRecentTaskList() { try { UiDevice.getInstance(instrumentation) .executeShellCommand("wm reset-freeze-recent-tasks") } catch (e: IOException) { Log.e("TestUtils", "Failed to reset frozen recent tasks list", e) } } }