diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java index bf1a98fa39e65..e3645e02fe7f1 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java @@ -39,7 +39,6 @@ import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.Choreographer; -import android.view.Display; import android.view.ISystemGestureExclusionListener; import android.view.IWindowManager; import android.view.InputDevice; @@ -105,9 +104,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker static final boolean DEBUG_MISSING_GESTURE = false; static final String DEBUG_MISSING_GESTURE_TAG = "NoBackGesture"; - private static final boolean ENABLE_PER_WINDOW_INPUT_ROTATION = - SystemProperties.getBoolean("persist.debug.per_window_input_rotation", false); - private ISystemGestureExclusionListener mGestureExclusionListener = new ISystemGestureExclusionListener.Stub() { @Override @@ -559,16 +555,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker private void onInputEvent(InputEvent ev) { if (!(ev instanceof MotionEvent)) return; MotionEvent event = (MotionEvent) ev; - if (ENABLE_PER_WINDOW_INPUT_ROTATION) { - final Display display = mContext.getDisplay(); - int rotation = display.getRotation(); - if (rotation != Surface.ROTATION_0) { - Point sz = new Point(); - display.getRealSize(sz); - event = MotionEvent.obtain(event); - event.transform(MotionEvent.createRotateMatrix(rotation, sz.x, sz.y)); - } - } onMotionEvent(event); } diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index 9be950521354c..15d2a056ffbb7 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -73,7 +73,6 @@ import android.os.RemoteCallbackList; import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; -import android.os.SystemProperties; import android.os.UserHandle; import android.os.VibrationEffect; import android.os.vibrator.StepSegment; @@ -175,9 +174,6 @@ public class InputManagerService extends IInputManager.Stub /** TODO(b/169067926): Remove this. */ private static final boolean UNTRUSTED_TOUCHES_TOAST = false; - public static final boolean ENABLE_PER_WINDOW_INPUT_ROTATION = - SystemProperties.getBoolean("persist.debug.per_window_input_rotation", false); - // Pointer to native input manager service object. private final long mPtr; diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 9d51b6f8d82fb..e90ffae5a5abd 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -1067,7 +1067,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final InputChannel inputChannel = mWmService.mInputManager.monitorInput( "PointerEventDispatcher" + mDisplayId, mDisplayId); - mPointerEventDispatcher = new PointerEventDispatcher(inputChannel, this); + mPointerEventDispatcher = new PointerEventDispatcher(inputChannel); // Tap Listeners are supported for: // 1. All physical displays (multi-display). diff --git a/services/core/java/com/android/server/wm/PointerEventDispatcher.java b/services/core/java/com/android/server/wm/PointerEventDispatcher.java index 9bc7e93443cbd..4f8ec631d9e26 100644 --- a/services/core/java/com/android/server/wm/PointerEventDispatcher.java +++ b/services/core/java/com/android/server/wm/PointerEventDispatcher.java @@ -16,15 +16,11 @@ package com.android.server.wm; -import static com.android.server.input.InputManagerService.ENABLE_PER_WINDOW_INPUT_ROTATION; - -import android.graphics.Point; import android.view.InputChannel; import android.view.InputDevice; import android.view.InputEvent; import android.view.InputEventReceiver; import android.view.MotionEvent; -import android.view.Surface; import android.view.WindowManagerPolicyConstants.PointerEventListener; import com.android.server.UiThread; @@ -35,12 +31,8 @@ public class PointerEventDispatcher extends InputEventReceiver { private final ArrayList mListeners = new ArrayList<>(); private PointerEventListener[] mListenersArray = new PointerEventListener[0]; - private final DisplayContent mDisplayContent; - private final Point mTmpSize = new Point(); - - public PointerEventDispatcher(InputChannel inputChannel, DisplayContent dc) { + public PointerEventDispatcher(InputChannel inputChannel) { super(inputChannel, UiThread.getHandler().getLooper()); - mDisplayContent = dc; } @Override @@ -49,15 +41,6 @@ public class PointerEventDispatcher extends InputEventReceiver { if (event instanceof MotionEvent && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { MotionEvent motionEvent = (MotionEvent) event; - if (ENABLE_PER_WINDOW_INPUT_ROTATION) { - final int rotation = mDisplayContent.getRotation(); - if (rotation != Surface.ROTATION_0) { - mDisplayContent.getDisplay().getRealSize(mTmpSize); - motionEvent = MotionEvent.obtain(motionEvent); - motionEvent.transform(MotionEvent.createRotateMatrix( - rotation, mTmpSize.x, mTmpSize.y)); - } - } PointerEventListener[] listeners; synchronized (mListeners) { if (mListenersArray == null) {