Add FLAG_CANCELED to synthesized MotionEvents
MotionEvents with ACTION_CANCELED are supposed to have FLAG_CANCELED
also set. This is currently enforced by InputVerifier.
However, the MotionEvents created in Java don't follow this contract.
Since we currently don't have an API to set flags, but we do have an API
to set action, fix this in the implementation of MotionEvent.java.
This helps with verification of injected events.
Bug: 211379801
Test: atest MotionEventTest
Change-Id: Idfb1524733e312d933b421e9fd1dda3c6722ae13
1 file changed