Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92e3cec4 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

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

parents 0e752faf 7bd93b16
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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();
            }