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

Commit 49972363 authored by Alex Chau's avatar Alex Chau
Browse files

Ensure TestLauncher is actaully shown in goToOverviewFromHome

- The previous activity can be other test activity with same package name, the check should be more speciifc on the launcher activity itself

Bug: 223278795
Test: com.android.quickstep.FallbackRecentsTest#goToOverviewFromHome
Change-Id: Ie9b88fa0ee16a5b1aec23258b09ab2a22450ac38
parent d5d06190
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ import java.util.function.Function;
@RunWith(AndroidJUnit4.class)
public class FallbackRecentsTest {

    private static final String FALLBACK_LAUNCHER_TITLE = "Test launcher";

    private final UiDevice mDevice;
    private final LauncherInstrumentation mLauncher;
    private final ActivityInfo mOtherLauncherActivity;
@@ -169,7 +171,7 @@ public class FallbackRecentsTest {
    public void goToOverviewFromHome() {
        mDevice.pressHome();
        assertTrue("Fallback Launcher not visible", mDevice.wait(Until.hasObject(By.pkg(
                mOtherLauncherActivity.packageName)), WAIT_TIME_MS));
                mOtherLauncherActivity.packageName).text(FALLBACK_LAUNCHER_TITLE)), WAIT_TIME_MS));

        mLauncher.getLaunchedAppState().switchToOverview();
    }
@@ -258,7 +260,7 @@ public class FallbackRecentsTest {
        // Test dismissing all tasks.
        pressHomeAndGoToOverview().dismissAllTasks();
        assertTrue("Fallback Launcher not visible", TestHelpers.wait(Until.hasObject(By.pkg(
                mOtherLauncherActivity.packageName)), WAIT_TIME_MS));
                mOtherLauncherActivity.packageName).text(FALLBACK_LAUNCHER_TITLE)), WAIT_TIME_MS));
    }

    private int getCurrentOverviewPage(RecentsActivity recents) {