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

Skip to content
Commit aecd8441 authored by Jakub Tyszkowski's avatar Jakub Tyszkowski Committed by Łukasz Rymanowski
Browse files

VolumeControl: Fix restoring earbuds volume

If we stream to one earbud and the second earbud connects with a
different volume level and a flag saying that it is a User-set volume is
set, we should realign its volume to the existing stream volume that was
probably already adjusted to the users liking.

We should apply this new volume to the system only if this is the first
earbud that has connected.

To make sure there is no race between connection and volume state change
events, we need to pass the volume event via the state machine just like
the connection event is. Otherwise the order of events arrival in the
service may differ from the order they were sent.

Bug: 373377157
Test: atest GoogleBluetoothInstrumentationTests
Flag: EXEMPT; Regression covered with unit test
Change-Id: Ifec0ae193a32019e091380dcc7b23f5fe097211f
parent d29d3c5d
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