Don't start dragging widget below bottom gesture margin
Bug: 215672979 Test: AddConfigWidgetTest Change-Id: I8121c0662249ec019f4f47a402f7f78655a6b930
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user