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

Commit 642d771d 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:...

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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I66ce4f6c756a21af7b0f7a0487c6df243fd97a66
parents 538986c4 f3992645
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6958,7 +6958,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*/);