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

Commit 160ab0fc authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Reduce use of clearCommunicationDevice.

We can reduce the use of clearCommunicationDevice so that it is only
called at the end of a call.  When switching routes mid-call, there is no
need to call it.

To fix this, we pass the destination audio route's active/inactive status
into `setOrigRoute` and update the `PendingAudioRoute` with that.
When `AudioRoute#clearCommunicationDevice` is called, we'll now only
clear if we are transitioning to an inactive state.

Flag: com.android.server.telecom.flags.only_clear_communication_device_on_inactive
Fixes: 376781369
Test: Run Telecom unit tests.
Test: Swap between earpiece/speaker, disconnect call.
Test: Swap between earpiece/speaker/SCO, disconnect call.
Test: Swap between earpiece/speaker/LE, disconnect call.
Change-Id: Ibc444784d96d9bf99700ba52cf321fcdcbfc2ea0
parent 6b2d00fc
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