Merge "Don't start dragging widget below bottom gesture margin"

This commit is contained in:
TreeHugger Robot
2022-01-25 18:47:18 +00:00
committed by Android (Google) Code Review
@@ -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",