diff options
author | vadimt <vadimt@google.com> | 2019-05-29 14:10:28 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-05-29 14:10:28 -0700 |
commit | 17f9d57ac7ba0d53cd33f0f7a387f2c6f1248aac (patch) | |
tree | 3a909b1f32522331e314a8a5f802ba3addd4bab1 /src/com/android/launcher3/touch | |
parent | 8ffa234955cae8d584bd5e416bed543c1664360f (diff) | |
download | android_packages_apps_Trebuchet-17f9d57ac7ba0d53cd33f0f7a387f2c6f1248aac.tar.gz android_packages_apps_Trebuchet-17f9d57ac7ba0d53cd33f0f7a387f2c6f1248aac.tar.bz2 android_packages_apps_Trebuchet-17f9d57ac7ba0d53cd33f0f7a387f2c6f1248aac.zip |
Add debug tracing for a lab-only flake
This time, Launcher doesn't send a completion event upon switching from
Home to all apps.
Bug: 133867119
Change-Id: I3738cf10a14ea288df2dfda387aafda022beb349
Diffstat (limited to 'src/com/android/launcher3/touch')
-rw-r--r-- | src/com/android/launcher3/touch/AbstractStateChangeTouchController.java | 11 | ||||
-rw-r--r-- | src/com/android/launcher3/touch/SwipeDetector.java | 6 |
2 files changed, 17 insertions, 0 deletions
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() { |