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

Skip to content
Commit 7833c9ad authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Reset the Active device to null if a wired headset is connected

If a Bluetooth headset is connected, it will become the Active device
for A2DP/HFP, and will be used for audio output. Then, if a wired
headset is connected, audio is automatically rerouted to the wired headset
by the Audio Framework. However, from Bluetooth perspective, the Active
device hasn't changed, therefore attempts to (re)set the Active device
to the Bluetooth headset will not be successful (the processing
will be no-op).

The solution is to keep track in the ActiveDeviceManager whether
a wired headset is connected - if yes, then explicitly reset the
Active device to null.

Bug: 78212654
Test: Manual - (1) connect a wired headset and Bluetooth headsets.
      (2) Switch the Active device to a Bluetooth headset.
      Unit tests added
Change-Id: I1cecd9a096ff5e5bc39583e21f6c8053610d2ee0
Merged-In: I1cecd9a096ff5e5bc39583e21f6c8053610d2ee0
(cherry picked from commit 3669a243)
parent d317d2c6
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