Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 93f342c9 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

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
parent f0ca8651
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment