Add logs for move pointer
* Appears in the flaky case we're getting a
long-press instead of a move.
Suspect performance might be an issue? Hopefully
the log between ACTION_DOWN and subsequent move can
show how long that is taking
Flag: None
Test: None
Bug: 311099513
Change-Id: I305dfdf7c6b64ef24ee5fec34a3f827ce6fbe2af
diff --git a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java
index 3e80e6b..e1b06a8 100644
--- a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java
+++ b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java
@@ -158,6 +158,7 @@
public static final String PERMANENT_DIAG_TAG = "TaplTarget";
public static final String TWO_TASKBAR_LONG_CLICKS = "b/262282528";
public static final String ICON_MISSING = "b/282963545";
+ public static final String WORKSPACE_LONG_PRESS = "b/311099513";
public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index e30885b..c693ba5 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -28,6 +28,8 @@
import static com.android.launcher3.tapl.TestHelpers.getOverviewPackageName;
import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;
import static com.android.launcher3.testing.shared.TestProtocol.REQUEST_NUM_ALL_APPS_COLUMNS;
+import static com.android.launcher3.testing.shared.TestProtocol.WORKSPACE_LONG_PRESS;
+import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
import android.app.ActivityManager;
import android.app.Instrumentation;
@@ -1684,6 +1686,7 @@
final Point start = new Point(startX, startY);
final Point end = new Point(endX, endY);
sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, start, gestureScope);
+ testLogD(WORKSPACE_LONG_PRESS, "Sent ACTION_DOWN");
if (mTrackpadGestureType != TrackpadGestureType.NONE) {
sendPointer(downTime, downTime, getPointerAction(MotionEvent.ACTION_POINTER_DOWN, 1),
start, gestureScope);
@@ -1888,6 +1891,10 @@
long steps = duration / GESTURE_STEP_MS;
long currentTime = startTime;
+ testLogD(WORKSPACE_LONG_PRESS, "movingPointer" +
+ " downTime: " + downTime + " startTime: " + startTime +
+ " duration: " + duration + " isDecel? " + isDecelerating +
+ " gestureScope: " + gestureScope);
if (isDecelerating) {
// formula: V = V0 - D*T, assuming V = 0 when T = duration