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

Commit 82d59b83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Mirror BLE unicast headset and broadcast volume changes" into main

parents 7a9e9072 4884ee11
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);