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

Skip to content
Commit 1dcf7281 authored by Daniel Norman's avatar Daniel Norman
Browse files

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
parent 9188aa60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment