diff options
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 1f0146ad815d..1ff443293e53 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -2325,6 +2325,13 @@ public class AudioService extends IAudioService.Stub // For legacy reason, propagate to all streams associated to this volume group for (final int groupedStream : vgs.getLegacyStreamTypes()) { + try { + ensureValidStreamType(groupedStream); + } catch (IllegalArgumentException e) { + Log.d(TAG, "volume group " + volumeGroup + " has internal streams (" + groupedStream + + "), do not change associated stream volume"); + continue; + } setStreamVolume(groupedStream, index, flags, callingPackage, callingPackage, Binder.getCallingUid()); } |