Loading quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.DisplayController; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; Loading Loading @@ -77,6 +78,11 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { return response; } case TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX: { return getLauncherUIProperty(Bundle::putInt, launcher -> launcher.<RecentsView>getOverviewPanel().getCurrentPage()); } case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true); return response; Loading quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +0 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import static org.junit.Assume.assumeTrue; import android.content.Intent; import android.content.res.Configuration; import android.platform.test.annotations.PlatinumTest; import androidx.test.filters.LargeTest; import androidx.test.platform.app.InstrumentationRegistry; Loading Loading @@ -113,7 +112,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @PlatinumTest(focusArea = "launcher") public void testOverview() throws Exception { startTestAppsWithCheck(); // mLauncher.pressHome() also tests an important case of pressing home while in background. Loading Loading @@ -412,7 +410,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch() @PlatinumTest(focusArea = "launcher") @TestStabilityRule.Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/309820115 @ScreenRecord // b/309820115 public void testOverviewForTablet() throws Exception { Loading src/com/android/launcher3/testing/TestInformationHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ public class TestInformationHandler implements ResourceBasedOverride { return null; } T value = provider.apply(target); Bundle response = new Bundle(); bundleSetter.set(response, TestProtocol.TEST_INFO_RESPONSE_FIELD, value); return response; Loading tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ public final class TestProtocol { public static final String REQUEST_GET_GRID_TASK_SIZE_RECT_FOR_TABLET = "get-grid-task-size-rect-for-tablet"; public static final String REQUEST_GET_OVERVIEW_PAGE_SPACING = "get-overview-page-spacing"; public static final String REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX = "get-overview-current-page-index"; public static final String REQUEST_ENABLE_ROTATION = "enable_rotation"; public static final String REQUEST_ENABLE_SUGGESTION = "enable-suggestion"; public static final String REQUEST_MODEL_QUEUE_CLEARED = "model-queue-cleared"; Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +5 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,11 @@ public final class LauncherInstrumentation { .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } public int getOverviewCurrentPageIndex() { return getTestInfo(TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX) .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } float getExactScreenCenterX() { return getRealDisplaySize().x / 2f; } Loading Loading
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.DisplayController; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; Loading Loading @@ -77,6 +78,11 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { return response; } case TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX: { return getLauncherUIProperty(Bundle::putInt, launcher -> launcher.<RecentsView>getOverviewPanel().getCurrentPage()); } case TestProtocol.REQUEST_HAS_TIS: { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true); return response; Loading
quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +0 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import static org.junit.Assume.assumeTrue; import android.content.Intent; import android.content.res.Configuration; import android.platform.test.annotations.PlatinumTest; import androidx.test.filters.LargeTest; import androidx.test.platform.app.InstrumentationRegistry; Loading Loading @@ -113,7 +112,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @PlatinumTest(focusArea = "launcher") public void testOverview() throws Exception { startTestAppsWithCheck(); // mLauncher.pressHome() also tests an important case of pressing home while in background. Loading Loading @@ -412,7 +410,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch() @PlatinumTest(focusArea = "launcher") @TestStabilityRule.Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/309820115 @ScreenRecord // b/309820115 public void testOverviewForTablet() throws Exception { Loading
src/com/android/launcher3/testing/TestInformationHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ public class TestInformationHandler implements ResourceBasedOverride { return null; } T value = provider.apply(target); Bundle response = new Bundle(); bundleSetter.set(response, TestProtocol.TEST_INFO_RESPONSE_FIELD, value); return response; Loading
tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ public final class TestProtocol { public static final String REQUEST_GET_GRID_TASK_SIZE_RECT_FOR_TABLET = "get-grid-task-size-rect-for-tablet"; public static final String REQUEST_GET_OVERVIEW_PAGE_SPACING = "get-overview-page-spacing"; public static final String REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX = "get-overview-current-page-index"; public static final String REQUEST_ENABLE_ROTATION = "enable_rotation"; public static final String REQUEST_ENABLE_SUGGESTION = "enable-suggestion"; public static final String REQUEST_MODEL_QUEUE_CLEARED = "model-queue-cleared"; Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +5 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,11 @@ public final class LauncherInstrumentation { .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } public int getOverviewCurrentPageIndex() { return getTestInfo(TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX) .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } float getExactScreenCenterX() { return getRealDisplaySize().x / 2f; } Loading