InputDispatcherPolicy: Transform incoming/outgoing events

The InputDispatcherPolicy expects events to be in the logical display
space. When per-window-input-rotation is enabled, the dispatcher works
in the display space, so we need to transform events accordingly.

1. MotionEvents that are injected from the policy are in logical display
coordinates. We need to transform them to display space before
proceeding with injection.

2. When sending events to the policy to be filtered by the InputFilter,
we need to include the display transform so that the events are in the
logical display space.

This also removes the flag gurad for the per-window-input-rotation
feature in Input.cpp, which is required for the tests to pass when the
flag is disabled. This guard does not do anything anymore because the
RawTransforms are blocked by the flag in SF.

Bug: 179274888
Test: manual: adb shell input swipe 200 200 500 500 1000
Test: atest InputShellCommandTest // CTS test for input injeciton
Test: atest inputflinger_tests
Change-Id: I122e511039ca629ab8982ed27d3d35f9e7b37d70
5 files changed