Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ef504aa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding tracing for a lab-only flake" into ub-launcher3-qt-dev

parents 4b417931 e17d1feb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -111,6 +111,14 @@ public class TestInformationProvider extends ContentProvider {
                    response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance);
                    break;
                }

                case TestProtocol.REQUEST_ENABLE_DRAG_LOGGING:
                    TestProtocol.sDebugTracing = true;
                    break;

                case TestProtocol.REQUEST_DISABLE_DRAG_LOGGING:
                    TestProtocol.sDebugTracing = false;
                    break;
            }
            return response;
        }
+8 −0
Original line number Diff line number Diff line
@@ -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;
        }

+4 −0
Original line number Diff line number Diff line
@@ -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";
}
+8 −0
Original line number Diff line number Diff line
@@ -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);
    }

+12 −0
Original line number Diff line number Diff line
@@ -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;
        }
Loading