Loading src/com/android/launcher3/testing/TestInformationHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,11 @@ public class TestInformationHandler implements ResourceBasedOverride { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, mDeviceProfile.isTablet); return response; case TestProtocol.REQUEST_IS_TWO_PANELS: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, mDeviceProfile.isTwoPanels); return response; default: return null; } Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public final class TestProtocol { public static final String REQUEST_STOP_EVENT_LOGGING = "stop-event-logging"; public static final String REQUEST_CLEAR_DATA = "clear-data"; public static final String REQUEST_IS_TABLET = "is-tablet"; public static final String REQUEST_IS_TWO_PANELS = "is-two-panel"; public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; Loading tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { } private int pagesPerScreen() { return mLauncher.isTablet() ? 2 : 1; return mLauncher.isTwoPanels() ? 2 : 1; } private boolean isWorkspaceScrollable(Launcher launcher) { Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +5 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,11 @@ public final class LauncherInstrumentation { .getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD); } public boolean isTwoPanels() { return getTestInfo(TestProtocol.REQUEST_IS_TWO_PANELS) .getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD); } void setActiveContainer(VisibleContainer container) { sActiveContainer = new WeakReference<>(container); } Loading tests/tapl/com/android/launcher3/tapl/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ public final class Workspace extends Home { } private boolean isWorkspaceScrollable(UiObject2 workspace) { return workspace.getChildCount() > (mLauncher.isTablet() ? 2 : 1); return workspace.getChildCount() > (mLauncher.isTwoPanels() ? 2 : 1); } @NonNull Loading Loading
src/com/android/launcher3/testing/TestInformationHandler.java +5 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,11 @@ public class TestInformationHandler implements ResourceBasedOverride { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, mDeviceProfile.isTablet); return response; case TestProtocol.REQUEST_IS_TWO_PANELS: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, mDeviceProfile.isTwoPanels); return response; default: return null; } Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public final class TestProtocol { public static final String REQUEST_STOP_EVENT_LOGGING = "stop-event-logging"; public static final String REQUEST_CLEAR_DATA = "clear-data"; public static final String REQUEST_IS_TABLET = "is-tablet"; public static final String REQUEST_IS_TWO_PANELS = "is-two-panel"; public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; Loading
tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { } private int pagesPerScreen() { return mLauncher.isTablet() ? 2 : 1; return mLauncher.isTwoPanels() ? 2 : 1; } private boolean isWorkspaceScrollable(Launcher launcher) { Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +5 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,11 @@ public final class LauncherInstrumentation { .getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD); } public boolean isTwoPanels() { return getTestInfo(TestProtocol.REQUEST_IS_TWO_PANELS) .getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD); } void setActiveContainer(VisibleContainer container) { sActiveContainer = new WeakReference<>(container); } Loading
tests/tapl/com/android/launcher3/tapl/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ public final class Workspace extends Home { } private boolean isWorkspaceScrollable(UiObject2 workspace) { return workspace.getChildCount() > (mLauncher.isTablet() ? 2 : 1); return workspace.getChildCount() > (mLauncher.isTwoPanels() ? 2 : 1); } @NonNull Loading