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

Commit c15c2656 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: remove redundant fixed volume management

Remove code handling fixed device volume in
AudioPolicyManager::computeVolume() as this is already
managed by AudioService.

Change-Id: Ib2be7578e40652c85a7d44c685ff9cc703d0c969
parent db2225b2
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -4264,14 +4264,6 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream,
        device = outputDesc->device();
    }

    // if volume is not 0 (not muted), force media volume to max on digital output
    if (stream == AUDIO_STREAM_MUSIC &&
        index != mStreams[stream].mIndexMin &&
        (device == AUDIO_DEVICE_OUT_AUX_DIGITAL ||
         device == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) {
        return 1.0;
    }

    volume = volIndexToAmpl(device, streamDesc, index);

    // if a headset is connected, apply the following rules to ring tones and notifications