Clean up special key handling in CarInputService.
This cleans up the handling of special (voice assist and call) keys in
CarInputService. Major changes:
- Repeated KEY_DOWN events will be ignored, instead of resetting the
long-press timer.
- Long-press triggers will run as soon as the long-press timer expires,
instead of needing to wait for the key to be released.
- Voice-recognition key callbacks are now Runnables, instead of
KeyEventListeners, because they can be triggered by time instead of
by a key event.
- Added full unit tests for CarInputService.
Bug: 33253121
Change-Id: I8000e511cb08edb8f481bac3ab4892124f2288d6
Fixed: 33253121
Test: atest CarServiceTest CarServiceUnitTest (only unrelated failures)
5 files changed