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

Commit f7f4f4d7 authored by Alex Chau's avatar Alex Chau
Browse files

Don't start dragging widget below bottom gesture margin

Bug: 215672979
Test: AddConfigWidgetTest
Change-Id: I8121c0662249ec019f4f47a402f7f78655a6b930
parent 78cac516
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
            final BySelector labelSelector = By.clazz("android.widget.TextView").text(labelText);
            final BySelector previewSelector = By.res(mLauncher.getLauncherPackageName(),
                    "widget_preview");
            final int bottomGestureStartOnScreen = mLauncher.getBottomGestureStartOnScreen();
            int i = 0;
            for (; ; ) {
                final Collection<UiObject2> tableRows = mLauncher.getChildren(widgetsContainer);
@@ -126,6 +127,9 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
                        if (label == null) {
                            continue;
                        }
                        if (widget.getVisibleCenter().y >= bottomGestureStartOnScreen) {
                            continue;
                        }
                        mLauncher.assertEquals(
                                "View is not WidgetCell",
                                "com.android.launcher3.widget.WidgetCell",