commit | 728053e9bb503eb9ff4c98504d9f1a48a001b8b1 | [log] [tgz] |
---|---|---|
author | Evan Rosky <erosky@google.com> | Thu May 06 01:04:01 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 06 01:04:01 2021 +0000 |
tree | a493423c0af43daf33b82a4d355f392804acbed3 | |
parent | 0d74388f8af29de0f4e653832937c9f425801901 [diff] | |
parent | a1837f7e34b98cdc1e33d85da482878f30fb322f [diff] |
Merge "Fix a bug in TouchInteractionService for fixed-display input rotation" into sc-dev am: 6255fd20f8 am: a1837f7e34 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14429344 Change-Id: If07b35913d523805ca4c40c7c953feb3e922eeab
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)); } }