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

Commit f89d65d9 authored by Brian Isganitis's avatar Brian Isganitis Committed by Android (Google) Code Review
Browse files

Merge changes from topic "taskbar-toast-tapl-nav-main" into main

* changes:
  Update AllApps search TAPL APIs support for system back and dismiss.
  Rename AllAppsFromTaskbar to TaskbarAllApps.
parents 66b7b208 e6038a7e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class SearchResultFromQsb {
     * Taps outside bottom sheet to dismiss and return to workspace. Available on tablets only.
     * @param tapRight Tap on the right of bottom sheet if true, or left otherwise.
     */
    public Workspace dismissByTappingOutsideForTablet(boolean tapRight) {
    public void dismissByTappingOutsideForTablet(boolean tapRight) {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
             LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                     "want to tap outside AllApps bottom sheet on the "
@@ -101,8 +101,12 @@ public class SearchResultFromQsb {
            mLauncher.touchOutsideContainer(allAppsBottomSheet, tapRight);
            try (LauncherInstrumentation.Closable tapped = mLauncher.addContextLayer(
                    "tapped outside AllApps bottom sheet")) {
                return mLauncher.getWorkspace();
                verifyVisibleContainerOnDismiss();
            }
        }
    }

    protected void verifyVisibleContainerOnDismiss() {
        mLauncher.getWorkspace();
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -45,4 +45,9 @@ public class SearchResultFromTaskbarQsb extends SearchResultFromQsb {
    protected TaskbarSearchWebSuggestion createWebSuggestion(UiObject2 webSuggestion) {
        return new TaskbarSearchWebSuggestion(mLauncher, webSuggestion);
    }

    @Override
    protected void verifyVisibleContainerOnDismiss() {
        mLauncher.getLaunchedAppState().assertTaskbarVisible();
    }
}
+10 −2
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public final class Taskbar {
    /**
     * Opens the Taskbar all apps page.
     */
    public AllAppsFromTaskbar openAllApps() {
    public TaskbarAllApps openAllApps() {
        try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                "want to open taskbar all apps");
             LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
@@ -101,7 +101,15 @@ public final class Taskbar {
                    mLauncher.waitForSystemLauncherObject(TASKBAR_RES_ID),
                    getAllAppsButtonSelector()));

            return new AllAppsFromTaskbar(mLauncher);
            return getAllApps();
        }
    }

    /** Returns {@link TaskbarAllApps} if it is open, otherwise fails. */
    public TaskbarAllApps getAllApps() {
        try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                "want to get taskbar all apps object")) {
            return new TaskbarAllApps(mLauncher);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ import com.android.launcher3.testing.shared.TestProtocol;
/**
 * Operations on AllApps opened from the Taskbar.
 */
public class AllAppsFromTaskbar extends AllApps {
public class TaskbarAllApps extends AllApps {

    AllAppsFromTaskbar(LauncherInstrumentation launcher) {
    TaskbarAllApps(LauncherInstrumentation launcher) {
        super(launcher);
    }