Apply translation/offset to events from pointer sources only

Non-pointer events from a relative motion device such as a trackball or
relative mouse (Pointer Capture) should be oriented in the same way as
the window it is directed to. We want them to be rotated if the window
transform has a rotation applied to it, but these relative events should
not be translated.

We only apply window translation to events from pointer sources because
they are the only ones that refer to absolute coordinates on the
display. We apply rotation for all motion events.

Bug: 179274888
Test: atest inputflinger_tests
Test: manual with test app
Change-Id: I8170697119d3d8e121b7b86de3201bac0edaaed9
2 files changed