summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/compat/AccessibilityManagerCompat.java3
-rw-r--r--src/com/android/launcher3/testing/TestProtocol.java1
-rw-r--r--src/com/android/launcher3/touch/AbstractStateChangeTouchController.java11
-rw-r--r--src/com/android/launcher3/touch/SwipeDetector.java6
-rw-r--r--tests/tapl/com/android/launcher3/tapl/Workspace.java2
5 files changed, 23 insertions, 0 deletions
diff --git a/src/com/android/launcher3/compat/AccessibilityManagerCompat.java b/src/com/android/launcher3/compat/AccessibilityManagerCompat.java
index 81c95cbdd..43ae65175 100644
--- a/src/com/android/launcher3/compat/AccessibilityManagerCompat.java
+++ b/src/com/android/launcher3/compat/AccessibilityManagerCompat.java
@@ -53,6 +53,9 @@ public class AccessibilityManagerCompat {
}
public static void sendStateEventToTest(Context context, int stateOrdinal) {
+ if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
+ android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "sendStateEventToTest");
+ }
final AccessibilityManager accessibilityManager = getAccessibilityManagerForTest(context);
if (accessibilityManager == null) return;
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index a678ef248..aff7861a8 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -68,6 +68,7 @@ public final class TestProtocol {
public static boolean sDebugTracing = false;
public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing";
public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";
+ public static final String NO_ALLAPPS_EVENT_TAG = "b/133867119";
public static final String NO_DRAG_TAG = "b/133009122";
public static final String NO_START_TAG = "b/132900132";
}
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index 35fc8731f..9703aa626 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -43,6 +43,7 @@ import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.compat.AccessibilityManagerCompat;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
@@ -363,6 +364,9 @@ public abstract class AbstractStateChangeTouchController
@Override
public void onDragEnd(float velocity, boolean fling) {
+ if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
+ android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragEnd");
+ }
final int logAction = fling ? Touch.FLING : Touch.SWIPE;
boolean blockedFling = fling && mFlingBlockCheck.isBlocked();
@@ -499,6 +503,9 @@ public abstract class AbstractStateChangeTouchController
}
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
+ if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
+ android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onSwipeInteractionCompleted 1");
+ }
if (mAtomicComponentsController != null) {
mAtomicComponentsController.getAnimationPlayer().end();
mAtomicComponentsController = null;
@@ -517,6 +524,10 @@ public abstract class AbstractStateChangeTouchController
}
mLauncher.getStateManager().goToState(targetState, false /* animated */);
+ if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
+ android.util.Log.e(
+ TestProtocol.NO_ALLAPPS_EVENT_TAG, "onSwipeInteractionCompleted 2");
+ }
AccessibilityManagerCompat.sendStateEventToTest(mLauncher, targetState.ordinal);
}
}
diff --git a/src/com/android/launcher3/touch/SwipeDetector.java b/src/com/android/launcher3/touch/SwipeDetector.java
index 4e3dcf8b8..4616e58fe 100644
--- a/src/com/android/launcher3/touch/SwipeDetector.java
+++ b/src/com/android/launcher3/touch/SwipeDetector.java
@@ -25,6 +25,7 @@ import android.view.VelocityTracker;
import android.view.ViewConfiguration;
import com.android.launcher3.Utilities;
+import com.android.launcher3.testing.TestProtocol;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
@@ -174,6 +175,11 @@ public class SwipeDetector {
}
mState = newState;
+ if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
+ android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG,
+ "setState: " + newState + " @ " + android.util.Log.getStackTraceString(
+ new Throwable()));
+ }
}
public boolean isDraggingOrSettling() {
diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java
index 7dcc426b9..33754c125 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -66,6 +66,7 @@ public final class Workspace extends Home {
"switchToAllApps: swipeHeight = " + swipeHeight + ", slop = "
+ mLauncher.getTouchSlop());
+ mLauncher.getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING);
mLauncher.swipeToState(
start.x,
start.y,
@@ -73,6 +74,7 @@ public final class Workspace extends Home {
start.y - swipeHeight - mLauncher.getTouchSlop(),
60,
ALL_APPS_STATE_ORDINAL);
+ mLauncher.getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING);
try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer(
"swiped to all apps")) {