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

Commit c460047d authored by Vlad Popa's avatar Vlad Popa Committed by Android (Google) Code Review
Browse files

Merge "Apply the avrcp volume when switching stream context" into main

parents 7c7a16a5 01cec45f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4954,6 +4954,15 @@ public class AudioService extends IAudioService.Stub
        }
        final Set<Integer> deviceTypes = getDeviceSetForStreamDirect(streamType);
        final Set<Integer> a2dpDevices = AudioSystem.intersectionAudioDeviceTypes(
                AudioSystem.DEVICE_OUT_ALL_A2DP_SET, deviceTypes);
        if (!a2dpDevices.isEmpty()) {
            int index = getStreamVolume(streamType,
                    a2dpDevices.toArray(new Integer[0])[0].intValue());
            mDeviceBroker.postSetAvrcpAbsoluteVolumeIndex(index);
        }
        final Set<Integer> absVolumeMultiModeCaseDevices =
                AudioSystem.intersectionAudioDeviceTypes(
                        mAbsVolumeMultiModeCaseDevices, deviceTypes);