diff options
author | vadimt <vadimt@google.com> | 2019-03-27 16:56:29 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-03-27 17:42:25 -0700 |
commit | 0b339b527396e86e7c478f9006bc5f63541c4c5c (patch) | |
tree | 791fdb20577eeac129f94a193feeac397f5622cd /src/com/android/launcher3/touch | |
parent | 60353faa2e796f461c9271b75b3849e070c4532f (diff) | |
download | android_packages_apps_Trebuchet-0b339b527396e86e7c478f9006bc5f63541c4c5c.tar.gz android_packages_apps_Trebuchet-0b339b527396e86e7c478f9006bc5f63541c4c5c.tar.bz2 android_packages_apps_Trebuchet-0b339b527396e86e7c478f9006bc5f63541c4c5c.zip |
Adding tracing for Lab-only flake: drag to workspace doesn't happen
Bug: 129434166
Change-Id: I4433a4848b57da42412a9108a0965ff13c708c39
Diffstat (limited to 'src/com/android/launcher3/touch')
3 files changed, 30 insertions, 3 deletions
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index c125c10d7..ca32330c3 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java @@ -229,6 +229,11 @@ public abstract class AbstractStateChangeTouchController @Override public void onDragStart(boolean start) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "AbstractStateChangeTouchController.onDragStart() called with: start = [" + + start + "]"); + } mStartState = mLauncher.getStateManager().getState(); if (mStartState == ALL_APPS) { mStartContainerType = LauncherLogProto.ContainerType.ALLAPPS; @@ -260,6 +265,11 @@ public abstract class AbstractStateChangeTouchController public boolean onDrag(float displacement) { float deltaProgress = mProgressMultiplier * (displacement - mDisplacementShift); float progress = deltaProgress + mStartProgress; + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "AbstractStateChangeTouchController.onDrag() called with: displacement = [" + + displacement + "], progress = [" + progress + "]"); + } updateProgress(progress); boolean isDragTowardPositive = (displacement - mDisplacementShift) < 0; if (progress <= 0) { @@ -384,6 +394,12 @@ public abstract class AbstractStateChangeTouchController ? MIN_PROGRESS_TO_ALL_APPS : SUCCESS_TRANSITION_PROGRESS; targetState = (interpolatedProgress > successProgress) ? mToState : mFromState; } + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "AbstractStateChangeTouchController.onDragEnd() called with: velocity = [" + + velocity + "], fling = [" + fling + "], target state: " + + targetState.getClass().getSimpleName()); + } final float endProgress; final float startProgress; diff --git a/src/com/android/launcher3/touch/ItemClickHandler.java b/src/com/android/launcher3/touch/ItemClickHandler.java index 363909002..3c77860b3 100644 --- a/src/com/android/launcher3/touch/ItemClickHandler.java +++ b/src/com/android/launcher3/touch/ItemClickHandler.java @@ -23,7 +23,6 @@ import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED; import static com.android.launcher3.Launcher.REQUEST_BIND_PENDING_APPWIDGET; import static com.android.launcher3.Launcher.REQUEST_RECONFIGURE_APPWIDGET; import static com.android.launcher3.model.AppLaunchTracker.CONTAINER_ALL_APPS; -import static com.android.launcher3.model.AppLaunchTracker.CONTAINER_DEFAULT; import android.app.AlertDialog; import android.content.Intent; @@ -33,6 +32,8 @@ import android.view.View; import android.view.View.OnClickListener; import android.widget.Toast; +import androidx.annotation.Nullable; + import com.android.launcher3.AppInfo; import com.android.launcher3.BubbleTextView; import com.android.launcher3.FolderInfo; @@ -50,8 +51,6 @@ import com.android.launcher3.util.PackageManagerHelper; import com.android.launcher3.widget.PendingAppWidgetHostView; import com.android.launcher3.widget.WidgetAddFlowHandler; -import androidx.annotation.Nullable; - /** * Class for handling clicks on workspace and all-apps items */ @@ -67,6 +66,14 @@ public class ItemClickHandler { } private static void onClick(View v, String sourceContainer) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onClick() called with: v = [" + v.getClass().getSimpleName() + + "], sourceContainer = [" + + (sourceContainer != null ? + sourceContainer.getClass().getSimpleName() : "null") + + "]"); + } // Make sure that rogue clicks don't get through while allapps is launching, or after the // view has detached (it's possible for this to happen if the view is removed mid touch). if (v.getWindowToken() == null) { diff --git a/src/com/android/launcher3/touch/ItemLongClickListener.java b/src/com/android/launcher3/touch/ItemLongClickListener.java index babbcdd16..003b44277 100644 --- a/src/com/android/launcher3/touch/ItemLongClickListener.java +++ b/src/com/android/launcher3/touch/ItemLongClickListener.java @@ -74,6 +74,10 @@ public class ItemLongClickListener { } private static boolean onAllAppsItemLongClick(View v) { + if (com.android.launcher3.TestProtocol.sDebugTracing) { + android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG, + "onAllAppsItemLongClick"); + } Launcher launcher = Launcher.getLauncher(v.getContext()); if (!canStartDrag(launcher)) return false; // When we have exited all apps or are in transition, disregard long clicks |