Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6255fd20 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug in TouchInteractionService for fixed-display input rotation" into sc-dev

parents 7ef54561 04fb7ee4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -496,6 +496,13 @@ public class TouchInteractionService extends Service implements PluginListener<O
            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));
            }
        }