Updates the HEADSETHOOK system action to directly answer/hangup calls.
Updated in both the legacy system (SystemActionPerformer) as well as
the new system (SystemActions in SysUI), in case a device does not use
the new SysUI style.
This preserves the HEADSETHOOK accessibility system action behavior
while allowing the telecom team the ability to change the listener
behavior for these key events.
- If a call is incoming: answer the call
- If a call is in progress: hang up the call
- Otherwise: send the KeyEvent so that media is played/paused
Bug: 278177899
Test: Unit test with mocks:
atest SystemActionsTest
Test: CTS within the Telecom test suite:
atest android.telecom.cts.AccessibilitySystemActionTest
Test: manual with a service that sends this system action
Change-Id: I735b3a14cefb6322ed1535ded83c4a08df4ada1a
Loading
Please register or sign in to comment