commit | ffcd1131ddb8f73eb9e2215bb1bacdba5cd53c78 | [log] [tgz] |
---|---|---|
author | Evan Rosky <erosky@google.com> | Thu May 06 00:49:08 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 06 00:49:08 2021 +0000 |
tree | 391adcb3c50511dc1b3cfb67d718a41396882044 | |
parent | 01ac8f3dad8afb62df7431b704d6b9310d44d7d0 [diff] | |
parent | 6255fd20f814487c81913fb8936d9457ac2d86f3 [diff] |
Merge "Fix a bug in TouchInteractionService for fixed-display input rotation" into sc-dev am: 6255fd20f8 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14429344 Change-Id: Ibee1e48fae33127b3f6bb023b9cc9466d87c213c
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 4fc9770..338a6ef 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -496,6 +496,13 @@ Point sz = new Point(); display.getRealSize(sz); if (rotation != Surface.ROTATION_0) { + if ((rotation % 2) != 0) { + // via display-manager, the display size is unrotated, so "rotate" its size + // to match the rotation we are transforming the event into. + final int tmpX = sz.x; + sz.x = sz.y; + sz.y = tmpX; + } event.transform(InputChannelCompat.createRotationMatrix(rotation, sz.x, sz.y)); } }