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
This commit is contained in:
vadimt
2019-05-29 14:10:28 -07:00
parent 8ffa234955
commit 17f9d57ac7
5 changed files with 23 additions and 0 deletions

View File

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