Merge "Logging for swiping to home not working" into ub-launcher3-rvc-dev am: 5bae2f4af1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11709415

Change-Id: I256860a2458d5adcd51275a4f52b179ee407376a
This commit is contained in:
TreeHugger Robot
2020-06-02 21:28:36 +00:00
committed by Automerger Merge Worker
2 changed files with 14 additions and 0 deletions
@@ -467,10 +467,17 @@ public class TouchInteractionService extends Service implements PluginListener<O
final int action = event.getAction();
if (action == ACTION_DOWN) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME, "TouchInteractionService.onInputEvent:DOWN");
}
mDeviceState.setOrientationTransformIfNeeded(event);
GestureState newGestureState;
if (mDeviceState.isInSwipeUpTouchRegion(event)) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME,
"TouchInteractionService.onInputEvent:isInSwipeUpTouchRegion");
}
// Clone the previous gesture state since onConsumerAboutToBeSwitched might trigger
// onConsumerInactive and wipe the previous gesture state
GestureState prevGestureState = new GestureState(mGestureState);
@@ -537,6 +544,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
private InputConsumer newConsumer(GestureState previousGestureState,
GestureState newGestureState, MotionEvent event) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME, "newConsumer");
}
boolean canStartSystemGesture = mDeviceState.canStartSystemGesture();
if (!mDeviceState.isUserUnlocked()) {
@@ -548,6 +558,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
return mResetGestureInputConsumer;
}
}
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME, "newConsumer:user is unlocked");
}
// When there is an existing recents animation running, bypass systemState check as this is
// a followup gesture and the first gesture started in a valid system state.
@@ -101,4 +101,5 @@ public final class TestProtocol {
public static final String PERMANENT_DIAG_TAG = "TaplTarget";
public static final String PAUSE_NOT_DETECTED = "b/139891609";
public static final String OVERIEW_NOT_ALLAPPS = "b/156095088";
public static final String NO_SWIPE_TO_HOME = "b/158017601";
}