Loading quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS; import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS; import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage; import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage; import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess; import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess; import static com.android.launcher3.ui.AbstractLauncherUiTest.resolveSystemApp; import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification; import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification; import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand; import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand; import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON; import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON; Loading Loading @@ -108,7 +109,7 @@ public class FallbackRecentsTest { @NavigationModeSwitch(mode = THREE_BUTTON) @NavigationModeSwitch(mode = THREE_BUTTON) @Test @Test public void goToOverviewFromApp() { public void goToOverviewFromApp() { startAppFast("com.android.settings"); startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR)); mLauncher.getBackground().switchToOverview(); mLauncher.getBackground().switchToOverview(); } } Loading tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -395,7 +395,7 @@ public abstract class AbstractLauncherUiTest { DEFAULT_UI_TIMEOUT)); DEFAULT_UI_TIMEOUT)); } } protected static String resolveSystemApp(String category) { public static String resolveSystemApp(String category) { return getInstrumentation().getContext().getPackageManager().resolveActivity( return getInstrumentation().getContext().getPackageManager().resolveActivity( new Intent(Intent.ACTION_MAIN).addCategory(category), new Intent(Intent.ACTION_MAIN).addCategory(category), PackageManager.MATCH_SYSTEM_ONLY). PackageManager.MATCH_SYSTEM_ONLY). Loading Loading
quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS; import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS; import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage; import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage; import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess; import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess; import static com.android.launcher3.ui.AbstractLauncherUiTest.resolveSystemApp; import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification; import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification; import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand; import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand; import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON; import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON; Loading Loading @@ -108,7 +109,7 @@ public class FallbackRecentsTest { @NavigationModeSwitch(mode = THREE_BUTTON) @NavigationModeSwitch(mode = THREE_BUTTON) @Test @Test public void goToOverviewFromApp() { public void goToOverviewFromApp() { startAppFast("com.android.settings"); startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR)); mLauncher.getBackground().switchToOverview(); mLauncher.getBackground().switchToOverview(); } } Loading
tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -395,7 +395,7 @@ public abstract class AbstractLauncherUiTest { DEFAULT_UI_TIMEOUT)); DEFAULT_UI_TIMEOUT)); } } protected static String resolveSystemApp(String category) { public static String resolveSystemApp(String category) { return getInstrumentation().getContext().getPackageManager().resolveActivity( return getInstrumentation().getContext().getPackageManager().resolveActivity( new Intent(Intent.ACTION_MAIN).addCategory(category), new Intent(Intent.ACTION_MAIN).addCategory(category), PackageManager.MATCH_SYSTEM_ONLY). PackageManager.MATCH_SYSTEM_ONLY). Loading