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

Commit 64e868f2 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: fix absolute volume mute

The gain applied to the leading use case whne absolute volume
is used must not be max if the stream is muted.

Test: repro steps in bug
Flag: com.android.media.audio.abs_volume_index_fix
Bug: 349244832
Change-Id: Ie099eaa809101eda70f27a3600ce9746bf3bfb6d
parent 7c7edfae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8171,7 +8171,7 @@ float AudioPolicyManager::adjustDeviceAttenuationForAbsVolume(IVolumeCurves &cur
            VolumeSource vsToDriveAbs = toVolumeSource(groupToDriveAbs);
            if (vsToDriveAbs == volumeSource) {
                // attenuation is applied by the abs volume controller
                return volumeDbMax;
                return (index != 0) ? volumeDbMax : volumeDb;
            } else {
                IVolumeCurves &curvesAbs = getVolumeCurves(vsToDriveAbs);
                int indexAbs = curvesAbs.getVolumeIndex({volumeDevice});