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

Commit 42907f02 authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Introduce TAPL APIs for Taskbar QSB and search results.

Includes support for interacting with app search results for Taskbar All
Apps.

Design doc: go/toasty-taskbar-tapl

Test: Compiles
Bug: 295366997
Flag: not needed
Change-Id: I07cb8a96a0aba2668ffc647ca2a6b8c1137157ca
parent c7087e8f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -336,4 +336,11 @@ public abstract class AllApps extends LauncherInstrumentation.VisibleContainer {
        final Bundle testInfo = mLauncher.getTestInfo(TestProtocol.REQUEST_APP_LIST_FREEZE_FLAGS);
        return testInfo == null ? 0 : testInfo.getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    /**
     * Return the QSB UI object on the AllApps screen.
     * @return the QSB UI object.
     */
    @NonNull
    public abstract Qsb getQsb();
}
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -62,4 +62,10 @@ public class AllAppsFromTaskbar extends AllApps {
        return mLauncher.getTestInfo(TestProtocol.REQUEST_TASKBAR_APPS_LIST_SCROLL_Y)
                .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    @NonNull
    @Override
    public TaskbarAllAppsQsb getQsb() {
        return new TaskbarAllAppsQsb(mLauncher, verifyActiveContainer());
    }
}
+1 −10
Original line number Diff line number Diff line
@@ -22,16 +22,7 @@ import androidx.test.uiautomator.UiObject2;
 */
class AllAppsQsb extends Qsb {

    private final UiObject2 mAllAppsContainer;

    AllAppsQsb(LauncherInstrumentation launcher, UiObject2 allAppsContainer) {
        super(launcher);
        mAllAppsContainer = allAppsContainer;
        waitForQsbObject();
    }

    @Override
    protected UiObject2 waitForQsbObject() {
        return mLauncher.waitForObjectInContainer(mAllAppsContainer, "search_container_all_apps");
        super(launcher, allAppsContainer, "search_container_all_apps");
    }
}
+1 −4
Original line number Diff line number Diff line
@@ -117,11 +117,8 @@ public class HomeAllApps extends AllApps {
        }
    }

    /**
     * Return the QSB UI object on the AllApps screen.
     * @return the QSB UI object.
     */
    @NonNull
    @Override
    public Qsb getQsb() {
        return new AllAppsQsb(mLauncher, verifyActiveContainer());
    }
+1 −10
Original line number Diff line number Diff line
@@ -22,16 +22,7 @@ import androidx.test.uiautomator.UiObject2;
 */
class HomeQsb extends Qsb {

    private final UiObject2 mHotSeat;

    HomeQsb(LauncherInstrumentation launcher, UiObject2 hotseat) {
        super(launcher);
        mHotSeat = hotseat;
        waitForQsbObject();
    }

    @Override
    protected UiObject2 waitForQsbObject() {
        return mLauncher.waitForObjectInContainer(mHotSeat, "search_container_hotseat");
        super(launcher, hotseat, "search_container_hotseat");
    }
}
Loading