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

Commit 444e95e5 authored by Vlad Popa's avatar Vlad Popa
Browse files

APM: do not mute LE broadcast in audioserver

This way the primary device will still be muted by the LE volume API and
the secondary device can continue playing music content.

Test: manual
Flag: EXEMPT bugfix
Bug: 359715033
Change-Id: I0265017697456bc3bf1d30e389c8957e90b4e92b
parent 97e57dde
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -8341,7 +8341,9 @@ float AudioPolicyManager::adjustDeviceAttenuationForAbsVolume(IVolumeCurves &cur
            VolumeSource vsToDriveAbs = toVolumeSource(groupToDriveAbs);
            if (vsToDriveAbs == volumeSource) {
                // attenuation is applied by the abs volume controller
                return (index != 0) ? volumeDbMax : volumeDb;
                // do not mute LE broadcast to allow the secondary device to continue playing
                return (index != 0 || volumeDevice == AUDIO_DEVICE_OUT_BLE_BROADCAST) ? volumeDbMax
                                                                                      : volumeDb;
            } else {
                IVolumeCurves &curvesAbs = getVolumeCurves(vsToDriveAbs);
                int indexAbs = curvesAbs.getVolumeIndex({volumeDevice});