diff options
author | vadimt <vadimt@google.com> | 2019-05-21 17:19:23 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-05-21 17:19:23 -0700 |
commit | e17d1feb791a383c5c12f1da02055b07eb832f02 (patch) | |
tree | 69c583e20e1b239f0f9654f93f424d663dca1b75 /src | |
parent | a1a417c99445e7590983b267eff41113a1775808 (diff) | |
download | android_packages_apps_Trebuchet-e17d1feb791a383c5c12f1da02055b07eb832f02.tar.gz android_packages_apps_Trebuchet-e17d1feb791a383c5c12f1da02055b07eb832f02.tar.bz2 android_packages_apps_Trebuchet-e17d1feb791a383c5c12f1da02055b07eb832f02.zip |
Adding tracing for a lab-only flake
We had a resolved case in the past where an app's context menu didn't
open on a long click (thanks to app updates), now the menu opens, but
the drag gesture doesn't drag the icon.
Bug: 133009122
Change-Id: I45d104a92fab6556ecd937aef76f0a8147e67f56
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/LauncherStateManager.java | 8 | ||||
-rw-r--r-- | src/com/android/launcher3/TestProtocol.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 8 | ||||
-rw-r--r-- | src/com/android/launcher3/dragndrop/DragController.java | 12 | ||||
-rw-r--r-- | src/com/android/launcher3/views/BaseDragLayer.java | 8 |
5 files changed, 40 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java index b1a3fc992..49ae33894 100644 --- a/src/com/android/launcher3/LauncherStateManager.java +++ b/src/com/android/launcher3/LauncherStateManager.java @@ -447,6 +447,10 @@ public class LauncherStateManager { } private void onStateTransitionStart(LauncherState state) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onStateTransitionStart"); + } if (mState != state) { mState.onStateDisabled(mLauncher); } @@ -572,6 +576,10 @@ public class LauncherStateManager { private final AnimatorSet mAnim; public StartAnimRunnable(AnimatorSet anim) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "StartAnimRunnable"); + } mAnim = anim; } diff --git a/src/com/android/launcher3/TestProtocol.java b/src/com/android/launcher3/TestProtocol.java index eefecda5d..081150db0 100644 --- a/src/com/android/launcher3/TestProtocol.java +++ b/src/com/android/launcher3/TestProtocol.java @@ -64,4 +64,8 @@ public final class TestProtocol { "all-apps-to-overview-swipe-height"; public static final String REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT = "home-to-all-apps-swipe-height"; + public static boolean sDebugTracing = false; + public static final String REQUEST_ENABLE_DRAG_LOGGING = "enable-drag-logging"; + public static final String REQUEST_DISABLE_DRAG_LOGGING = "disable-drag-logging"; + public static final String NO_DRAG_TAG = "b/133009122"; } diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index a508ce52b..d19f9cd73 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -371,6 +371,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator> @Override public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onDragStart 1"); + } if (ENFORCE_DRAG_EVENT_ORDER) { enforceDragParity("onDragStart", 0, 0); } @@ -421,6 +425,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator> } // Always enter the spring loaded mode + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onDragStart 2"); + } mLauncher.getStateManager().goToState(SPRING_LOADED); } diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java index f92e00acb..bf692fe47 100644 --- a/src/com/android/launcher3/dragndrop/DragController.java +++ b/src/com/android/launcher3/dragndrop/DragController.java @@ -472,6 +472,10 @@ public class DragController implements DragDriver.EventListener, TouchController } private void handleMoveEvent(int x, int y) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "handleMoveEvent 1"); + } mDragObject.dragView.move(x, y); // Drop on someone? @@ -488,6 +492,10 @@ public class DragController implements DragDriver.EventListener, TouchController if (mIsInPreDrag && mOptions.preDragCondition != null && mOptions.preDragCondition.shouldStartDrag(mDistanceSinceScroll)) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "handleMoveEvent 2"); + } callOnDragStart(); } } @@ -525,6 +533,10 @@ public class DragController implements DragDriver.EventListener, TouchController * Call this from a drag source view. */ public boolean onControllerTouchEvent(MotionEvent ev) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onControllerTouchEvent"); + } if (mDragDriver == null || mOptions == null || mOptions.isAccessibleDrag) { return false; } diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java index 3c81bcf39..496418240 100644 --- a/src/com/android/launcher3/views/BaseDragLayer.java +++ b/src/com/android/launcher3/views/BaseDragLayer.java @@ -213,6 +213,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext> @Override public boolean onTouchEvent(MotionEvent ev) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onTouchEvent " + ev); + } int action = ev.getAction(); if (action == ACTION_UP || action == ACTION_CANCEL) { if (mTouchCompleteListener != null) { @@ -222,6 +226,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext> } if (mActiveController != null) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onTouchEvent 1"); + } return mActiveController.onControllerTouchEvent(ev); } else { // In case no child view handled the touch event, we may not get onIntercept anymore |