Remove workaround for unrotated gesture monitor (2/3)

There is currently a conflation between per-window-input-rotation and
unrotated gesture monitors. We would like to enable
per-widnow-input-rotation first without affecting gesture monitors so
that the old behavior is maintained for gesture monitors.

We can then add unrotated gesture monitors as a new feature later on.

Bug: 201982032
Bug: 179274888
Test: manual
Change-Id: I721ef278a9e0d9287e67b28e953b4ec4c4aea4e3
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 1baa100..3db3907 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -2541,24 +2541,9 @@
     target.flags = InputTarget::FLAG_DISPATCH_AS_IS;
     ui::Transform t;
     if (const auto& it = mDisplayInfos.find(displayId); it != mDisplayInfos.end()) {
-        // Input monitors always get un-rotated display coordinates. We undo the display
-        // rotation that is present in the display transform so that display rotation is not
-        // applied to these input targets.
-        const auto& displayInfo = it->second;
-        int32_t width = displayInfo.logicalWidth;
-        int32_t height = displayInfo.logicalHeight;
-        const auto orientation = displayInfo.transform.getOrientation();
-        uint32_t inverseOrientation = orientation;
-        if (orientation == ui::Transform::ROT_90) {
-            inverseOrientation = ui::Transform::ROT_270;
-            std::swap(width, height);
-        } else if (orientation == ui::Transform::ROT_270) {
-            inverseOrientation = ui::Transform::ROT_90;
-            std::swap(width, height);
-        }
-        target.displayTransform =
-                ui::Transform(inverseOrientation, width, height) * displayInfo.transform;
-        t = t * target.displayTransform;
+        const auto& displayTransform = it->second.transform;
+        target.displayTransform = displayTransform;
+        t = displayTransform;
     }
     target.setDefaultPointerTransform(t);
     inputTargets.push_back(target);