InputDispatcher: Check injection permission in tests
- Forwards the unused parameters injectionTimeout and injectionMode to the test helper method. - Checks injection permission in the test against the default PID and UID used for injection. Adding this caused a regression in many tests. Since the tests never gave Dispatcher permission for injection, none of the input events were marked with the TRUSTED flag, which, for tests that inject a key DOWN event, disqualified key repeats from taking place. Now that injected events are TRUSTED, the dispatcher can never idle after a key DOWN because it needs to wake up to process the key repeat. Therefore we need to disable key repeats with the policy flag when injecting a key DOWN in tests that need the Dispatcher to idle. Bug: 173733166 Test: atest inputflinger_tests Change-Id: Ie5084ae3e8f2a0b77930bf3943cce0d7bd21d3a6
Loading
Please register or sign in to comment