Merge "Remove workaround for unrotated gesture monitor (3/3)"
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index bb8473b..d1f3b5a 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -44,7 +44,6 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
-import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Icon;
@@ -54,13 +53,10 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.SystemClock;
-import android.os.SystemProperties;
import android.util.Log;
import android.view.Choreographer;
-import android.view.Display;
import android.view.InputEvent;
import android.view.MotionEvent;
-import android.view.Surface;
import android.view.accessibility.AccessibilityManager;
import androidx.annotation.BinderThread;
@@ -108,7 +104,6 @@
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
import com.android.systemui.shared.system.ActivityManagerWrapper;
-import com.android.systemui.shared.system.InputChannelCompat;
import com.android.systemui.shared.system.InputChannelCompat.InputEventReceiver;
import com.android.systemui.shared.system.InputConsumerController;
import com.android.systemui.shared.system.InputMonitorCompat;
@@ -145,9 +140,6 @@
*/
private static final int SYSTEM_ACTION_ID_ALL_APPS = 14;
- public static final boolean ENABLE_PER_WINDOW_INPUT_ROTATION =
- SystemProperties.getBoolean("persist.debug.per_window_input_rotation", false);
-
private int mBackGestureNotificationCounter = -1;
@Nullable
private OverscrollPlugin mOverscrollPlugin;
@@ -536,15 +528,6 @@
return;
}
MotionEvent event = (MotionEvent) ev;
- if (ENABLE_PER_WINDOW_INPUT_ROTATION) {
- final Display display = mDisplayManager.getDisplay(mDeviceState.getDisplayId());
- int rotation = display.getRotation();
- Point sz = new Point();
- display.getRealSize(sz);
- if (rotation != Surface.ROTATION_0) {
- event.transform(InputChannelCompat.createRotationMatrix(rotation, sz.x, sz.y));
- }
- }
TestLogging.recordMotionEvent(
TestProtocol.SEQUENCE_TIS, "TouchInteractionService.onInputEvent", event);
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index 725c7c4..9782b0a 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -37,12 +37,10 @@
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.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 @@
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 @@
// 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 @@
mPassedPilferInputSlop = mPassedWindowMoveSlop = continuingPreviousGesture;
mDisableHorizontalSwipe = !mPassedPilferInputSlop && disableHorizontalSwipe;
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
- mDisplayManager = getSystemService(DisplayManager.class);
}
@Override
@@ -203,17 +195,6 @@
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()) {