From ef558648e6196abe3557802515ec0fa83786e2f6 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 24 Oct 2019 12:15:54 -0700 Subject: [PATCH] Bump time to scroll to last visible row (affects jank/perf tests) - Regression from ag/9592395, bump the time of scrolling to the last visible row slightly to prevent a fling Bug: 141484300 Change-Id: I41c041fe591aceebc63b7e869a705164babb09ea --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index c90c8f673e..3713c1485f 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -791,6 +791,8 @@ public final class LauncherInstrumentation { final int distance = gestureStart - container.getVisibleBounds().top - topPadding; final int bottomMargin = container.getVisibleBounds().height() - distance; + // TODO: Make the gesture steps dependent on the distance so that it can run for various + // screen sizes scroll( container, Direction.DOWN, @@ -799,7 +801,7 @@ public final class LauncherInstrumentation { 0, 0, Math.max(bottomMargin, getBottomGestureMargin(container))), - 70); + 80); } void scroll(UiObject2 container, Direction direction, Rect margins, int steps) {