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

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

Merge "Introduce TAPL APIs for Taskbar QSB and search results." into udc-qpr-dev

parents f209443b 42907f02
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