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

Commit 10043990 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Reset the frozen recents list state prior to test runs" into main

parents a3388903 e5d9cc88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
    public static void initialize(
            AbstractLauncherUiTest test, boolean clearWorkspace) throws Exception {
        test.reinitializeLauncherData(clearWorkspace);
        test.mLauncher.resetFreezeRecentTaskList();
        test.mDevice.pressHome();
        test.waitForLauncherCondition("Launcher didn't start", launcher -> launcher != null);
        test.waitForState("Launcher internal state didn't switch to Home",
+11 −0
Original line number Diff line number Diff line
@@ -755,6 +755,17 @@ public final class LauncherInstrumentation {
        return isTablet() ? getLauncherPackageName() : SYSTEMUI_PACKAGE;
    }

    /**
     * Resets the frozen recent tasks list if necessary from a previous quickswitch.
     */
    public void resetFreezeRecentTaskList() {
        try {
            mDevice.executeShellCommand("wm reset-freeze-recent-tasks");
        } catch (IOException e) {
            Log.e(TAG, "Failed to reset fozen recent tasks list", e);
        }
    }

    private UiObject2 verifyContainerType(ContainerType containerType) {
        waitForLauncherInitialized();