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

Commit fb3ae6a6 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Converting more pressBack calls to calls that wait for animation

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: Ib4e08b4778a24ac617ea1e0101147612b0f53967
parent f2643521
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);
        }
    }