Loading tests/src/com/android/launcher3/allapps/TaplOpenCloseAllApps.java +4 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,10 @@ public class TaplOpenCloseAllApps extends AbstractLauncherUiTest { InstrumentationRegistry.getInstrumentation().getUiAutomation().adoptShellPermissionIdentity( READ_DEVICE_CONFIG_PERMISSION); 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(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR)); mLauncher.pressBack(); Loading tests/tapl/com/android/launcher3/tapl/HomeAllApps.java +13 −0 Original line number Diff line number Diff line Loading @@ -118,4 +118,17 @@ public class HomeAllApps extends AllApps { public boolean isHomeState() { return true; } /** Send the "back" gesture to go to workspace. */ public Workspace pressBackToWorkspace() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to press back from all apps to workspace")) { mLauncher.runToState( () -> mLauncher.pressBackImpl(), NORMAL_STATE_ORDINAL, "pressing back"); return new Workspace(mLauncher); } } } Loading
tests/src/com/android/launcher3/allapps/TaplOpenCloseAllApps.java +4 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,10 @@ public class TaplOpenCloseAllApps extends AbstractLauncherUiTest { InstrumentationRegistry.getInstrumentation().getUiAutomation().adoptShellPermissionIdentity( READ_DEVICE_CONFIG_PERMISSION); 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(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR)); mLauncher.pressBack(); Loading
tests/tapl/com/android/launcher3/tapl/HomeAllApps.java +13 −0 Original line number Diff line number Diff line Loading @@ -118,4 +118,17 @@ public class HomeAllApps extends AllApps { public boolean isHomeState() { return true; } /** Send the "back" gesture to go to workspace. */ public Workspace pressBackToWorkspace() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to press back from all apps to workspace")) { mLauncher.runToState( () -> mLauncher.pressBackImpl(), NORMAL_STATE_ORDINAL, "pressing back"); return new Workspace(mLauncher); } } }