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

Commit 88ce1933 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "audio:Suppress device volume to safe volume" am: d2717d9e am: 9825982b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605053

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifcb46717cded982013470d9a45346612ab1109e5
parents d77e30fa 9825982b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6554,7 +6554,10 @@ public class AudioService extends IAudioService.Stub
    private void onSetVolumeIndexOnDevice(@NonNull DeviceVolumeUpdate update) {
        final VolumeStreamState streamState = mStreamStates[update.mStreamType];
        if (update.hasVolumeIndex()) {
            final int index = update.getVolumeIndex();
            int index = update.getVolumeIndex();
            if (!checkSafeMediaVolume(update.mStreamType, index, update.mDevice)) {
                index = safeMediaVolumeIndex(update.mDevice);
            }
            streamState.setIndex(index, update.mDevice, update.mCaller,
                    // trusted as index is always validated before message is posted
                    true /*hasModifyAudioSettings*/);