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

Commit 4884ee11 authored by Vlad Popa's avatar Vlad Popa
Browse files

Mirror BLE unicast headset and broadcast volume changes

Test: manual
Bug: 411039246
Flag: EXEMPT bugfix
Change-Id: I10447522d71a6551ce41041b32134ada1521e1b1
parent 33c3a30b
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
@@ -10020,8 +10020,10 @@ public class AudioService extends IAudioService.Stub
                            }
                        }
                    }
                    // Mirror changes in SPEAKER ringtone volume on SCO when
                    if (changed && mStreamType == AudioSystem.STREAM_RING
                    if (changed) {
                        // Mirror changes in SPEAKER ringtone volume on SCO
                        if (mStreamType == AudioSystem.STREAM_RING
                                && device == AudioSystem.DEVICE_OUT_SPEAKER) {
                            for (int i = 0; i < mIndexMap.size(); i++) {
                                int otherDevice = mIndexMap.keyAt(i);
@@ -10030,7 +10032,13 @@ public class AudioService extends IAudioService.Stub
                                }
                            }
                        }
                    if (changed) {
                        // Mirror BLE unicast headset and broadcast volume changes
                        if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET) {
                            mIndexMap.put(AudioSystem.DEVICE_OUT_BLE_BROADCAST, index);
                        } else if (device == AudioSystem.DEVICE_OUT_BLE_BROADCAST) {
                            mIndexMap.put(AudioSystem.DEVICE_OUT_BLE_HEADSET, index);
                        }
                        // If associated to volume group, update group cache
                        updateVolumeGroupIndex(device, /* forceMuteState= */ false);