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
Loading
Please register or sign in to comment