diff options
author | vadimt <vadimt@google.com> | 2019-09-26 14:17:44 -0700 |
---|---|---|
committer | Vadim Tryshev <vadimt@google.com> | 2019-09-26 23:54:30 +0000 |
commit | 7028b10c547445f0ea05ce395edc54944e93a6a7 (patch) | |
tree | 9dd381be9eafe24ece92bd15ba6225616108a04d /tests/tapl/com/android/launcher3/tapl/AllApps.java | |
parent | 77f045b607792be845307e931e43a9aed3d05d5b (diff) | |
download | android_packages_apps_Trebuchet-7028b10c547445f0ea05ce395edc54944e93a6a7.tar.gz android_packages_apps_Trebuchet-7028b10c547445f0ea05ce395edc54944e93a6a7.tar.bz2 android_packages_apps_Trebuchet-7028b10c547445f0ea05ce395edc54944e93a6a7.zip |
Removing magic constant 0.8f from AllApps
Bug: 123904290
Change-Id: I52aeb3c0452175ba37b2524d632e8069ba0911c9
Merged-in: I91ff4d4f962eefea787989362c32d987f546e84d
Diffstat (limited to 'tests/tapl/com/android/launcher3/tapl/AllApps.java')
-rw-r--r-- | tests/tapl/com/android/launcher3/tapl/AllApps.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java index f070280ea..f63612dd1 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllApps.java +++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java @@ -90,6 +90,7 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { final UiObject2 allAppsContainer = verifyActiveContainer(); final UiObject2 appListRecycler = mLauncher.waitForObjectInContainer(allAppsContainer, "apps_list_view"); + final UiObject2 searchBox = getSearchBox(allAppsContainer); allAppsContainer.setGestureMargins( 0, getSearchBox(allAppsContainer).getVisibleBounds().bottom + 1, @@ -103,7 +104,11 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { int scroll = getScroll(allAppsContainer); try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer("scrolled")) { while (!hasClickableIcon(allAppsContainer, appListRecycler, appIconSelector)) { - mLauncher.scroll(allAppsContainer, Direction.DOWN, 0.8f, null, 50); + mLauncher.scrollToLastVisibleRow( + allAppsContainer, + mLauncher.getObjectsInContainer(allAppsContainer, "icon"), + searchBox.getVisibleBounds().bottom - + allAppsContainer.getVisibleBounds().top); final int newScroll = getScroll(allAppsContainer); if (newScroll == scroll) break; |