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

Skip to content
Commit 8a15fcec authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Change active audio route to use set/clear communication APIs.

Currently, only the active speaker route, BT LE audio and BT heaing aid
audio use these APIs when entering/exiting these routes. We also need to
set the communication device for the other active routes such as for
earpiece, headset, and BT SCO. The important concept of this bug is
pairing each request made to change audio routes with setting the
communication device for the correpsonding device.

Additionally, there's an edge case where we can be in a quiescent route
while in-call. This happens with BT when we receive a SWITCH_FOCUS to
transition into the active route and the BT connection fails. We
fall back to the QuiescentEarpieceRoute instead of ActiveEarpieceRoute.
The code logic for QuiescentBluetoothRoute has been changed to
transition into the ActiveBluetoothRoute first and then attempt to
set BT on in ActiveBluetoothRoute#enter.

This CL also takes care of an existing issue of not being able to switch
between multiple LE audio devices. This required changing the logic in
BluetoothDeviceManager#setLeAudioCommunicationDevice to be aware of the
specific device we're trying to set the communication device for.

Bug: 244452873
Bug: 270029273
Bug: 239491709
Test: Unit
Change-Id: I68d38ab50c9f4f49b1a4ef67c51023d1b61d7047
parent 1f147dbe
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