mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Adding test protocol support for getting num all apps columns" into main
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user