From 846718a79ac2c0572965658d0dc2531d6c0602c5 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Fri, 3 Aug 2018 19:15:46 -0700 Subject: [PATCH] Removing magic constant 0.1f from Overview Bug: 110103162 Test: TaplTests suite Change-Id: If3af510360158a2c2b1c3d13c75321c49ece67e2 --- tests/tapl/com/android/launcher3/tapl/Overview.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index 3d504c45e5..9493990746 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -93,13 +93,10 @@ public final class Overview extends LauncherInstrumentation.VisibleContainer { public AllAppsFromOverview switchToAllApps() { verifyActiveContainer(); - // Swipe from the hotseat to near the top, e.g. 10% of the screen. - final UiObject2 predictionRow = mLauncher.waitForLauncherObject( - "prediction_row"); - final Point start = predictionRow.getVisibleCenter(); - final int endY = (int) (mLauncher.getDevice().getDisplayHeight() * 0.1f); - mLauncher.swipe( - start.x, start.y, start.x, endY); + // Swipe from navbar to the top. + final UiObject2 navBar = mLauncher.getSystemUiObject("navigation_bar_frame"); + final Point start = navBar.getVisibleCenter(); + mLauncher.swipe(start.x, start.y, start.x, 0); return new AllAppsFromOverview(mLauncher); }