InputManagerService: Use default display for input injection if not specified
When the MotionEvent's displayId is not specified when injecting input
events with pointer sources, use the default Context's display.
Key, touchpad, and joystick events don't need any transformations, so do
not rotate them.
This also fixes the improper re-use of getContextForDisplay() in two
different scenarios.
Bug: 179274888
Test: atest InputShellCommandTest
Change-Id: I8221cadbe334f0d0d3ba215b0f54e8decfed508a
1 file changed