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

Commit ae625f3d authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Converting more pressBack calls to calls that wait for animation" into main

parents b33f831e fb3ae6a6
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -358,14 +358,11 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
        // Debug if we need to goHome to prevent wrong previous state b/315525621
        mLauncher.goHome();
        assumeFalse(FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get());
        mLauncher.getWorkspace().switchToAllApps();
        mLauncher.pressBack();
        mLauncher.getWorkspace();
        mLauncher.getWorkspace().switchToAllApps().pressBackToWorkspace();
        waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);

        startAppFast(CALCULATOR_APP_PACKAGE);
        mLauncher.pressBack();
        mLauncher.getWorkspace();
        mLauncher.getLaunchedAppState().pressBackToWorkspace();
        waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
    }

+1 −2
Original line number Diff line number Diff line
@@ -214,8 +214,7 @@ public class TaplOpenCloseAllApps extends AbstractLauncherUiTest {
                .pressBackToWorkspace();
        waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
        startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
        mLauncher.pressBack();
        mLauncher.getWorkspace();
        mLauncher.getLaunchedAppState().pressBackToWorkspace();
        waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
    }

+8 −4
Original line number Diff line number Diff line
@@ -346,10 +346,14 @@ public final class LaunchedAppState extends Background {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
             LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                     "want to press back from launched app to workspace")) {
            if (mLauncher.isLauncher3()) {
                mLauncher.pressBackImpl();
            } else {
                mLauncher.executeAndWaitForWallpaperAnimation(
                        () -> mLauncher.pressBackImpl(),
                        "pressing back"
                );
            }
            return new Workspace(mLauncher);
        }
    }