Fix foldable emulator touch does not work

When foldable emulator change to minimized state and rotate screen,
the physical display would align to right-top (rotate to 90) or
left-bottom (rotate to 270), but the touch axes range still keep
the initialed values, so when cookPointerData, it would also align to
right-top or left-bottom when display rotated.

- Fix the surface range when display had offset and rotated.
- Fix the surface range checker function.

Bug: 138708005
Test: atest inputflinger_tests
Test: open foldable emulator, change to minimized state and rotate device,
      test if touch can work fine.
Change-Id: Idc97107512dd1c11e3783eb3276635f69d3b047b
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.h b/services/inputflinger/reader/mapper/TouchInputMapper.h
index 89c017d..4b1c0cb 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.h
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.h
@@ -758,6 +758,7 @@
     static void assignPointerIds(const RawState* last, RawState* current);
 
     const char* modeToString(DeviceMode deviceMode);
+    void rotateAndScale(float& x, float& y);
 };
 
 } // namespace android