Remove workaround for unrotated gesture monitor (3/3)

There is currently a conflation between per-window-input-rotation and
unrotated gesture monitors. We would like to enable
per-widnow-input-rotation first without affecting gesture monitors so
that the old behavior is maintained for gesture monitors.

We can then add unrotated gesture monitors as a new feature later on.

Bug: 201982032
Bug: 179274888
Test: manual
Change-Id: I935165446e1a347129e9eb3cc816c62b24d4fc47
This commit is contained in:
Prabir Pradhan committed 2021-10-04 06:06:18 -07:00
1 parent 1b25982283
commit 85f0cec3dc
2 files changed
-36

No files matched your search

@@ -37,12 +37,10 @@ import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.graphics.PointF;
import android.hardware.display.DisplayManager;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
@@ -64,7 +62,6 @@ import com.android.quickstep.RecentsAnimationCallbacks;
import com.android.quickstep.RecentsAnimationDeviceState;
import com.android.quickstep.RotationTouchHelper;
import com.android.quickstep.TaskAnimationManager;
import com.android.quickstep.TouchInteractionService;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.CachedEventDispatcher;
import com.android.quickstep.util.MotionPauseDetector;
@@ -114,8 +111,6 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
private final PointF mLastPos = new PointF();
private int mActivePointerId = INVALID_POINTER_ID;
private int mLastRotation = -1;
// Distance after which we start dragging the window.
private final float mTouchSlop;
@@ -133,8 +128,6 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
// Might be displacement in X or Y, depending on the direction we are swiping from the nav bar.
private float mStartDisplacement;
private final DisplayManager mDisplayManager;
private Handler mMainThreadHandler;
private Runnable mCancelRecentsAnimationRunnable = () -> {
ActivityManagerWrapper.getInstance().cancelRecentsAnimation(
@@ -177,7 +170,6 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
mPassedPilferInputSlop = mPassedWindowMoveSlop = continuingPreviousGesture;
mDisableHorizontalSwipe = !mPassedPilferInputSlop && disableHorizontalSwipe;
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDisplayManager = getSystemService(DisplayManager.class);
}
@Override
@@ -203,17 +195,6 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
return;
}
if (TouchInteractionService.ENABLE_PER_WINDOW_INPUT_ROTATION) {
final Display display = mDisplayManager.getDisplay(mDeviceState.getDisplayId());
final int rotation = display.getRotation();
if (rotation != mLastRotation) {
// If rotation changes, reset tracking to avoid degenerate velocities.
mLastPos.set(ev.getX(), ev.getY());
mVelocityTracker.clear();
mLastRotation = rotation;
}
}
// Proxy events to recents view
if (mPassedWindowMoveSlop && mInteractionHandler != null
&& !mRecentsViewDispatcher.hasConsumer()) {