Merge "Not using settings app in tests" into ub-launcher3-qt-dev am: 643007d613

am: 387fdae45f

Change-Id: I204d788ce63c1a60474f3296f30d46ab0e479e60
This commit is contained in:
Vadim Tryshev
2019-06-12 16:00:31 -07:00
committed by android-build-merger
2 changed files with 3 additions and 2 deletions

View File

@@ -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.TestHelpers.getHomeIntentInPackage;
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.getLauncherCommand;
import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON;
@@ -108,7 +109,7 @@ public class FallbackRecentsTest {
@NavigationModeSwitch(mode = THREE_BUTTON)
@Test
public void goToOverviewFromApp() {
startAppFast("com.android.settings");
startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
mLauncher.getBackground().switchToOverview();
}

View File

@@ -395,7 +395,7 @@ public abstract class AbstractLauncherUiTest {
DEFAULT_UI_TIMEOUT));
}
protected static String resolveSystemApp(String category) {
public static String resolveSystemApp(String category) {
return getInstrumentation().getContext().getPackageManager().resolveActivity(
new Intent(Intent.ACTION_MAIN).addCategory(category),
PackageManager.MATCH_SYSTEM_ONLY).