Merge "Capture Launcher icon positions by reusing UiObject2" into main
diff --git a/tests/tapl/com/android/launcher3/tapl/AppIcon.java b/tests/tapl/com/android/launcher3/tapl/AppIcon.java
index 7c6d684..02a862d 100644
--- a/tests/tapl/com/android/launcher3/tapl/AppIcon.java
+++ b/tests/tapl/com/android/launcher3/tapl/AppIcon.java
@@ -18,6 +18,7 @@
import static com.android.launcher3.testing.shared.TestProtocol.TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE;
+import android.graphics.Point;
import android.util.Log;
import android.widget.TextView;
@@ -129,6 +130,14 @@
}
/**
+ * @return the center coordinates of the icon
+ */
+ @NonNull
+ public Point getVisibleCenter() {
+ return getObject().getVisibleCenter();
+ }
+
+ /**
* Create a regular expression pattern that matches strings containing all of the non-whitespace
* characters of the app name, with any amount of whitespace added between characters (e.g.
* newline for multiline app labels).