From b6d1843f938f0d5aa6dd8d8a48da704407ae0702 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 3 Mar 2023 20:21:34 +0100 Subject: [PATCH] AudioService: fix BT SCO volume mute BT SCO stream should not be automatically muted when its index reaches 0. It can only be muted via the adjustStreamVolume API with mute direction. Bug: 267184792 Test: repro steps in bug Test: atest AudioManagerTest Test: atest AccessibilityVolumeTest Test: atest AudioServiceHostTest#testAudioVolumeGroups Change-Id: I55441ca4947a24cf1488538ecfb3222d79bc5f49 --- services/core/java/com/android/server/audio/AudioService.java | 4 +++- 1 file changed, 3 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 9f1512825c3a8..521f342455d6a 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -8396,7 +8396,9 @@ public class AudioService extends IAudioService.Stub if (isMutable()) { // For call stream, align mute only when muted, not when index is set to 0 mVolumeGroupState.mute( - forceMuteState ? mIsMuted : groupIndex == 0 || mIsMuted); + forceMuteState ? mIsMuted : + (groupIndex == 0 && !isCallStream(mStreamType)) + || mIsMuted); } } }