Adding tracing for Lab-only flake: drag to workspace doesn't happen

Bug: 129434166
Change-Id: I4433a4848b57da42412a9108a0965ff13c708c39
This commit is contained in:
vadimt
2019-03-27 16:56:29 -07:00
parent 60353faa2e
commit 0b339b5273
12 changed files with 111 additions and 14 deletions

View File

@@ -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;