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

Skip to content
Commit 29b039b9 authored by Archie Pusaka's avatar Archie Pusaka Committed by Archie Pusaka
Browse files

Floss: Support multiple volume callbacks

Currently we assume there is only one volume callback and we always
replace the callback if a new audio device is connected.

When two audio devices are connected simultaneously, the later device
is disconnected because we can only stream audio to one device.
However, the volume callback is tied to that device, so now if the user
changes the volume, we can't call the correct callback.

This CL stores callback to all connected devices, so we can get the
correct callback when user updates the system volume.
Also, to simplify things, whenever floss layer receives an AVRCP
connection when there is an existing connection, we ask libbluetooth
to drop the newer connection. This behavior can be updated later, e.g.
when the old connection is disconnected we can smartly switch to the
new connection.

Bug: 366387141
Test: m -j
Test: Pair two headsets that connects AVRCP when they reconnects.
      Connect each headset one by one. Verify the 2nd device is
      disconnected, and the 1st device still receive volume updates.
Flag: EXEMPT, floss only change

Change-Id: I2e0f707fd11a3a6dbf827d839f95ec57f47e98d9
parent 6976c730
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