Merge "Removing magic constant 0.1f from Overview" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2018-08-10 22:03:12 +00:00 committed by Android (Google) Code Review
commit 8f7137b769
1 changed files with 4 additions and 7 deletions

View File

@ -93,13 +93,10 @@ public final class Overview extends LauncherInstrumentation.VisibleContainer {
public AllAppsFromOverview switchToAllApps() { public AllAppsFromOverview switchToAllApps() {
verifyActiveContainer(); verifyActiveContainer();
// Swipe from the hotseat to near the top, e.g. 10% of the screen. // Swipe from navbar to the top.
final UiObject2 predictionRow = mLauncher.waitForLauncherObject( final UiObject2 navBar = mLauncher.getSystemUiObject("navigation_bar_frame");
"prediction_row"); final Point start = navBar.getVisibleCenter();
final Point start = predictionRow.getVisibleCenter(); mLauncher.swipe(start.x, start.y, start.x, 0);
final int endY = (int) (mLauncher.getDevice().getDisplayHeight() * 0.1f);
mLauncher.swipe(
start.x, start.y, start.x, endY);
return new AllAppsFromOverview(mLauncher); return new AllAppsFromOverview(mLauncher);
} }