From 1a5dc053527e51f52a05768e0048658feb12b199 Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Fri, 3 Jul 2020 11:50:17 +0200 Subject: [PATCH] Unmute audio streams for full volume device Moving an audio device to full volume behavior ensures all audio strams are at max volume. However muted audio streams remain muted. Full volume devices do not allow mute changes, leaving streams that are muted stuck in this state. This adds to the logic turning streams to max volume to also unmute streams if the device is in full volume behavior. BUG: 160447552 Test: manual Change-Id: Ic74108b7e2928f715d0b4773ab59284f3829eb22 --- .../core/java/com/android/server/audio/AudioService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 4fd9ae256592f..c8e4ee02e603e 100755 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -1320,6 +1320,11 @@ public class AudioService extends IAudioService.Stub device, caller, true /*hasModifyAudioSettings*/); } mStreamStates[streamType].checkFixedVolumeDevices(); + + // Unmute streams if device is full volume + if (mFullVolumeDevices.contains(device)) { + mStreamStates[streamType].mute(false); + } } }