From 45926dcc1f5705a708648fedbb944422b1f3de4b Mon Sep 17 00:00:00 2001 From: Hank Freund Date: Fri, 11 Dec 2015 10:50:45 -0800 Subject: [PATCH] Change default stream volume for TV to 1/4 max instead of 3/4 b/26048878 Change-Id: I423e9b8fb03d6875e7d0e4a4266943e950defefe (cherry picked from commit db27de5da493b9d791321e8771ae59998dad8c28) --- .../core/java/com/android/server/audio/AudioService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 3174c705d32c1..64dea571f014e 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -630,7 +630,11 @@ public class AudioService extends IAudioService.Stub { MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]); if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) { MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume; - AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4; + if (isPlatformTelevision()) { + AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume / 4; + } else { + AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4; + } } sSoundEffectVolumeDb = context.getResources().getInteger(