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

Commit a187ab0e authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Adding test protocol support for getting num all apps columns" into main

parents 654c0583 8e4077f8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -165,6 +165,11 @@ public class TestInformationHandler implements ResourceBasedOverride {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, mDeviceProfile.isTablet);
                return response;

            case TestProtocol.REQUEST_NUM_ALL_APPS_COLUMNS:
                response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        mDeviceProfile.numShownAllAppsColumns);
                return response;

            case TestProtocol.REQUEST_IS_TWO_PANELS:
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        FOLDABLE_SINGLE_PAGE.get() ? false : mDeviceProfile.isTwoPanels);
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ public final class TestProtocol {
    public static final String REQUEST_CLEAR_DATA = "clear-data";
    public static final String REQUEST_HOTSEAT_ICON_NAMES = "get-hotseat-icon-names";
    public static final String REQUEST_IS_TABLET = "is-tablet";
    public static final String REQUEST_NUM_ALL_APPS_COLUMNS = "num-all-apps-columns";
    public static final String REQUEST_IS_TWO_PANELS = "is-two-panel";
    public static final String REQUEST_START_DRAG_THRESHOLD = "start-drag-threshold";
    public static final String REQUEST_SHELL_DRAG_READY = "shell-drag-ready";
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static android.view.MotionEvent.AXIS_GESTURE_SWIPE_FINGER_COUNT;
import static com.android.launcher3.tapl.Folder.FOLDER_CONTENT_RES_ID;
import static com.android.launcher3.tapl.TestHelpers.getOverviewPackageName;
import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_NUM_ALL_APPS_COLUMNS;

import android.app.ActivityManager;
import android.app.Instrumentation;
@@ -353,6 +354,11 @@ public final class LauncherInstrumentation {
                .getParcelable(TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    public int getNumAllAppsColumns() {
        return getTestInfo(REQUEST_NUM_ALL_APPS_COLUMNS).getInt(
                TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    public boolean isTablet() {
        return getTestInfo(TestProtocol.REQUEST_IS_TABLET)
                .getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD);