Merge "Reducing usage of magic constants in TAPL's widgets" into ub-launcher3-qt-qpr1-dev

am: 92e3cec417

Change-Id: Iac12e2303e000791687ae56187b9988e50796245
This commit is contained in:
Vadim Tryshev
2019-09-25 21:18:58 -07:00
committed by android-build-merger
@@ -48,7 +48,12 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
"want to fling forward in widgets")) {
LauncherInstrumentation.log("Widgets.flingForward enter");
final UiObject2 widgetsContainer = verifyActiveContainer();
mLauncher.scroll(widgetsContainer, Direction.DOWN, 1f, MARGINS, FLING_STEPS);
final int margin = widgetsContainer.getVisibleBounds().bottom -
mLauncher.getRealDisplaySize().y +
ResourceUtils.getNavbarSize(
ResourceUtils.NAVBAR_BOTTOM_GESTURE_SIZE, mLauncher.getResources());
mLauncher.scroll(
widgetsContainer, Direction.DOWN, 1f, new Rect(0, 0, 0, margin), FLING_STEPS);
try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer("flung forward")) {
verifyActiveContainer();
}