diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java index e1e9b8d851..cc92327037 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllApps.java +++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java @@ -163,7 +163,7 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { "Exceeded max scroll attempts: " + MAX_SCROLL_ATTEMPTS, ++attempts <= MAX_SCROLL_ATTEMPTS); - mLauncher.scroll(allAppsContainer, Direction.UP, margins, 50); + mLauncher.scroll(allAppsContainer, Direction.UP, margins, 12); } try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer("scrolled up")) { diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 484cbb61c3..c90c8f673e 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -424,11 +424,7 @@ public final class LauncherInstrumentation { // b/136278866 for (int i = 0; i != 100; ++i) { if (getNavigationModeMismatchError() == null) break; - try { - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } + sleep(100); } final String error = getNavigationModeMismatchError(); @@ -803,7 +799,7 @@ public final class LauncherInstrumentation { 0, 0, Math.max(bottomMargin, getBottomGestureMargin(container))), - 150); + 70); } void scroll(UiObject2 container, Direction direction, Rect margins, int steps) { diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index 4f8aeb1123..16a64a7499 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -58,7 +58,7 @@ public final class Overview extends BaseOverview { getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD), mLauncher.getDevice().getDisplayWidth() / 2, 0, - 50, + 12, ALL_APPS_STATE_ORDINAL); try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java index d1261e07be..db3314e9b1 100644 --- a/tests/tapl/com/android/launcher3/tapl/Workspace.java +++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java @@ -38,7 +38,7 @@ import com.android.launcher3.testing.TestProtocol; * Operations on the workspace screen. */ public final class Workspace extends Home { - private static final int DRAG_DURACTION = 2000; + private static final int DRAG_DURATION = 500; private static final int FLING_STEPS = 10; private final UiObject2 mHotseat; @@ -72,7 +72,7 @@ public final class Workspace extends Home { start.y, start.x, start.y - swipeHeight - mLauncher.getTouchSlop(), - 60, + 12, ALL_APPS_STATE_ORDINAL); try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( @@ -166,7 +166,7 @@ public final class Workspace extends Home { launcher.waitForLauncherObject(longPressIndicator); LauncherInstrumentation.log("dragIconToWorkspace: indicator"); launcher.movePointer( - downTime, SystemClock.uptimeMillis(), DRAG_DURACTION, launchableCenter, dest); + downTime, SystemClock.uptimeMillis(), DRAG_DURATION, launchableCenter, dest); LauncherInstrumentation.log("dragIconToWorkspace: moved pointer"); launcher.sendPointer( downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, dest);