summaryrefslogtreecommitdiffstats
path: root/tests/tapl/com/android/launcher3/tapl/Widgets.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tapl/com/android/launcher3/tapl/Widgets.java')
-rw-r--r--tests/tapl/com/android/launcher3/tapl/Widgets.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/tapl/com/android/launcher3/tapl/Widgets.java b/tests/tapl/com/android/launcher3/tapl/Widgets.java
index cbc3a815f..94003be91 100644
--- a/tests/tapl/com/android/launcher3/tapl/Widgets.java
+++ b/tests/tapl/com/android/launcher3/tapl/Widgets.java
@@ -16,12 +16,6 @@
package com.android.launcher3.tapl;
-import static org.junit.Assert.fail;
-
-import android.graphics.Point;
-
-import androidx.test.uiautomator.By;
-import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
@@ -81,28 +75,4 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
protected LauncherInstrumentation.ContainerType getContainerType() {
return LauncherInstrumentation.ContainerType.WIDGETS;
}
-
- public Widget getWidget(String label) {
- final int margin = ResourceUtils.getNavbarSize(
- ResourceUtils.NAVBAR_BOTTOM_GESTURE_SIZE, mLauncher.getResources()) + 1;
- final UiObject2 widgetsContainer = verifyActiveContainer();
- widgetsContainer.setGestureMargins(0, 0, 0, margin);
-
- final Point displaySize = mLauncher.getRealDisplaySize();
-
- int i = 0;
- final BySelector selector = By.
- clazz("com.android.launcher3.widget.WidgetCell").
- hasDescendant(By.text(label));
-
- for (; ; ) {
- final UiObject2 widget = mLauncher.tryWaitForLauncherObject(selector, 300);
- if (widget != null && widget.getVisibleBounds().intersects(
- 0, 0, displaySize.x, displaySize.y - margin)) {
- return new Widget(mLauncher, widget);
- }
- if (++i > 40) fail("Too many attempts");
- widgetsContainer.scroll(Direction.DOWN, 1f);
- }
- }
}