Workaround to return 1/3 of the position
Some devices in portrait mode have the same symptoms as b/234322284.
Simply return 1/3 of the position like the X axis to solve the problem.
Bug: 238202110
Test: atest Launcher3Tests:TaplTestsLauncher3#testAddDeleteShortcutOnHotseat
Change-Id: Ic7d3756cfbda6673a62b266c6093745b8311e6ac
diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java
index 7f444d6..0334b96 100644
--- a/src/com/android/launcher3/testing/TestInformationHandler.java
+++ b/src/com/android/launcher3/testing/TestInformationHandler.java
@@ -206,7 +206,7 @@
/* spanX= */ 1, /* spanY= */ 1);
// TODO(b/234322284): return the real center point.
return new Point(cellRect.left + (cellRect.right - cellRect.left) / 3,
- cellRect.centerY());
+ cellRect.top + (cellRect.bottom - cellRect.top) / 3);
});
}