Loading services/core/java/com/android/server/audio/AudioService.java +17 −45 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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:" Loading Loading @@ -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; Loading @@ -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) Loading Loading @@ -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)) { Loading Loading
services/core/java/com/android/server/audio/AudioService.java +17 −45 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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:" Loading Loading @@ -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; Loading @@ -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) Loading Loading @@ -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)) { Loading