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

Commit 41e3ce18 authored by Vlad Popa's avatar Vlad Popa
Browse files

Remove rolled out flag set_stream_volume_order

This flag has been rolled out in 24Q2 and can be removed.

Test: make
Bug: 329202581
Flag: EXEMPT removing com.android.media.audio.set_stream_volume_order
Change-Id: Ia056e1e33a611d7bfdfaaa081cd54af66d1c3d90
parent 73a3e6ed
Loading
Loading
Loading
Loading
+17 −45
Original line number Diff line number Diff line
@@ -74,7 +74,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;
@@ -4984,8 +4983,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:"
@@ -5178,7 +5176,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;
@@ -5200,7 +5197,6 @@ public class AudioService extends IAudioService.Stub
                    canChangeMuteAndUpdateController /*canChangeMute*/);
            index = getVssForStreamOrDefault(streamType).getIndex(device);
        }
        }
        int streamToDriveAbsVol = absVolumeIndexFix() ? getBluetoothContextualVolumeStream() :
                AudioSystem.STREAM_MUSIC;
@@ -5237,30 +5233,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)) {