diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java index ecfc77ccf1..506830d531 100644 --- a/src/com/android/launcher3/testing/TestInformationHandler.java +++ b/src/com/android/launcher3/testing/TestInformationHandler.java @@ -126,11 +126,11 @@ public class TestInformationHandler implements ResourceBasedOverride { case TestProtocol.REQUEST_APPS_LIST_SCROLL_Y: { try { - final int deferUpdatesFlags = MAIN_EXECUTOR.submit(() -> + final int scroll = MAIN_EXECUTOR.submit(() -> mLauncher.getAppsView().getActiveRecyclerView().getCurrentScrollY()) .get(); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, - deferUpdatesFlags); + scroll); } catch (ExecutionException | InterruptedException e) { throw new RuntimeException(e); } diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java index 3bdeb14925..e344bbdb71 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllApps.java +++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java @@ -130,6 +130,9 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { searchBox.getVisibleBounds().bottom - allAppsContainer.getVisibleBounds().top); final int newScroll = getAllAppsScroll(); + mLauncher.assertTrue( + "Scrolled in a wrong direction in AllApps: from " + scroll + " to " + + newScroll, newScroll >= scroll); if (newScroll == scroll) break; mLauncher.assertTrue(