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

Commit 58affa14 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove rolled out flag set_stream_volume_order" into main

parents 4dfe3293 41e3ce18
Loading
Loading
Loading
Loading
+17 −45
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ import static com.android.media.audio.Flags.equalScoLeaVcIndexRange;
import static com.android.media.audio.Flags.replaceStreamBtSco;
import static com.android.media.audio.Flags.ringMyCar;
import static com.android.media.audio.Flags.ringerModeAffectsAlarm;
import static com.android.media.audio.Flags.setStreamVolumeOrder;
import static com.android.media.audio.Flags.vgsVssSyncMuteOrder;
import static com.android.media.flags.Flags.enableAudioInputDeviceRoutingAndVolumeControl;
import static com.android.server.audio.SoundDoseHelper.ACTION_CHECK_MUSIC_ACTIVE;
@@ -4981,8 +4980,7 @@ public class AudioService extends IAudioService.Stub
                + audioserverPermissions());
        pw.println("\tcom.android.media.audio.disablePrescaleAbsoluteVolume:"
                + disablePrescaleAbsoluteVolume());
        pw.println("\tcom.android.media.audio.setStreamVolumeOrder:"
                + setStreamVolumeOrder());
        pw.println("\tcom.android.media.audio.setStreamVolumeOrder - EOL");
        pw.println("\tandroid.media.audio.roForegroundAudioControl:"
                + roForegroundAudioControl());
        pw.println("\tandroid.media.audio.scoManagedByAudio:"
@@ -5174,7 +5172,6 @@ public class AudioService extends IAudioService.Stub
        index = rescaleIndex(index * 10, streamType, streamTypeAlias);
        if (setStreamVolumeOrder()) {
        flags &= ~AudioManager.FLAG_FIXED_VOLUME;
        if (streamTypeAlias == AudioSystem.STREAM_MUSIC && isFixedVolumeDevice(device)) {
            flags |= AudioManager.FLAG_FIXED_VOLUME;
@@ -5196,7 +5193,6 @@ public class AudioService extends IAudioService.Stub
                    canChangeMuteAndUpdateController /*canChangeMute*/);
            index = getVssForStreamOrDefault(streamType).getIndex(device);
        }
        }
        if (streamTypeAlias == getBluetoothContextualVolumeStream()
                && AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
@@ -5231,30 +5227,6 @@ public class AudioService extends IAudioService.Stub
            mDeviceBroker.postSetHearingAidVolumeIndex(index, streamType);
        }
        if (!setStreamVolumeOrder()) {
            flags &= ~AudioManager.FLAG_FIXED_VOLUME;
            if (streamTypeAlias == AudioSystem.STREAM_MUSIC && isFixedVolumeDevice(device)) {
                flags |= AudioManager.FLAG_FIXED_VOLUME;
                // volume is either 0 or max allowed for fixed volume devices
                if (index != 0) {
                    index = mSoundDoseHelper.getSafeMediaVolumeIndex(device);
                    if (index < 0) {
                        index = streamState.getMaxIndex();
                    }
                }
            }
            if (!mSoundDoseHelper.willDisplayWarningAfterCheckVolume(streamType, index, device,
                    flags)) {
                onSetStreamVolume(streamType, index, flags, device, caller, hasModifyAudioSettings,
                        // ada is non-null when called from setDeviceVolume,
                        // which shouldn't update the mute state
                        canChangeMuteAndUpdateController /*canChangeMute*/);
                index = getVssForStreamOrDefault(streamType).getIndex(device);
            }
        }
        synchronized (mHdmiClientLock) {
            if (streamTypeAlias == AudioSystem.STREAM_MUSIC
                    && (oldIndex != index)) {