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

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

Merge "Not using settings app in tests" into ub-launcher3-qt-dev

parents 16284b95 87fbd33a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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;
@@ -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();
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -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).