Fix tap is wrong in landscape with cutout disabled
The coordinate values in TouchInputMapper and raw events should be
orientation-independent, we should not rotate the raw events while
checking the range. And it should start from the current logcial
right/bottom instead of the original right/bottom when it needs to
reverse the coordinate.
- Let 'rotateAndScale' could transform raw coordinate to surface.
- Range checking should only base on natural orientation.
- Change the test case to be more robust and could test 90 and 270
degrees cases.
Bug: 138708005
Test: atest inputflinger_tests
Test: open foldable emulator, change to minimized state and rotate
device, test touch.
Test: let device has display offset, rotate device and check touch.
Change-Id: I945e489866bc41b5c14ed4a143952bc85248b3e9
3 files changed