diff options
author | vadimt <vadimt@google.com> | 2019-05-31 13:27:24 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-05-31 13:34:24 -0700 |
commit | a8f77a6afd75f8bd18778d09a9eb6363b5f9bcc7 (patch) | |
tree | 95fa8e028b27cc5941560a5d30649fb3fa89ba46 /src/com/android/launcher3/touch | |
parent | 164ebb2e8c15ba6b21bac943490fe8c5127d230b (diff) | |
download | android_packages_apps_Trebuchet-a8f77a6afd75f8bd18778d09a9eb6363b5f9bcc7.tar.gz android_packages_apps_Trebuchet-a8f77a6afd75f8bd18778d09a9eb6363b5f9bcc7.tar.bz2 android_packages_apps_Trebuchet-a8f77a6afd75f8bd18778d09a9eb6363b5f9bcc7.zip |
More debug tracing for switching to all apps not sending the final event
(to the test)
Bug: 134172603
Bug: 133867119
Change-Id: I00cf3a35daefa23d2e72a89d21e6ce37c8a9a46d
Diffstat (limited to 'src/com/android/launcher3/touch')
-rw-r--r-- | src/com/android/launcher3/touch/AbstractStateChangeTouchController.java | 16 | ||||
-rw-r--r-- | src/com/android/launcher3/touch/SwipeDetector.java | 12 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index 9703aa626..4e5f7a59a 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java @@ -31,6 +31,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.os.SystemClock; +import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.MotionEvent; @@ -118,6 +119,9 @@ public abstract class AbstractStateChangeTouchController @Override public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onControllerInterceptTouchEvent 1 " + ev); + } if (ev.getAction() == MotionEvent.ACTION_DOWN) { mNoIntercept = !canInterceptTouch(ev); if (mNoIntercept) { @@ -147,6 +151,9 @@ public abstract class AbstractStateChangeTouchController return false; } + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onControllerInterceptTouchEvent 2 "); + } onControllerTouchEvent(ev); return mDetector.isDraggingOrSettling(); } @@ -234,6 +241,9 @@ public abstract class AbstractStateChangeTouchController @Override public void onDragStart(boolean start) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragStart 1 " + start); + } mStartState = mLauncher.getStateManager().getState(); if (mStartState == ALL_APPS) { mStartContainerType = LauncherLogProto.ContainerType.ALLAPPS; @@ -243,6 +253,9 @@ public abstract class AbstractStateChangeTouchController mStartContainerType = LauncherLogProto.ContainerType.TASKSWITCHER; } if (mCurrentAnimation == null) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragStart 2"); + } mFromState = mStartState; mToState = null; cancelAnimationControllers(); @@ -552,6 +565,9 @@ public abstract class AbstractStateChangeTouchController } private void cancelAnimationControllers() { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "cancelAnimationControllers"); + } mCurrentAnimation = null; cancelAtomicComponentsController(); mDetector.finishedScrolling(); diff --git a/src/com/android/launcher3/touch/SwipeDetector.java b/src/com/android/launcher3/touch/SwipeDetector.java index 4616e58fe..3d454046a 100644 --- a/src/com/android/launcher3/touch/SwipeDetector.java +++ b/src/com/android/launcher3/touch/SwipeDetector.java @@ -158,6 +158,9 @@ public class SwipeDetector { // SETTLING -> (View settled) -> IDLE private void setState(ScrollState newState) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "setState -- start: " + newState); + } if (DBG) { Log.d(TAG, "setState:" + mState + "->" + newState); } @@ -165,6 +168,9 @@ public class SwipeDetector { if (newState == ScrollState.DRAGGING) { initializeDragging(); if (mState == ScrollState.IDLE) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "setState -- 1: " + newState); + } reportDragStart(false /* recatch */); } else if (mState == ScrollState.SETTLING) { reportDragStart(true /* recatch */); @@ -318,9 +324,15 @@ public class SwipeDetector { break; } mDisplacement = mDir.getDisplacement(ev, pointerIndex, mDownPos, mIsRtl); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onTouchEvent 1"); + } // handle state and listener calls. if (mState != ScrollState.DRAGGING && shouldScrollStart(ev, pointerIndex)) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onTouchEvent 2"); + } setState(ScrollState.DRAGGING); } if (mState == ScrollState.DRAGGING) { |