From 122d63025d9636b7db5cc45d8e641432a0b3aff8 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Mon, 3 Apr 2023 06:43:59 +0000 Subject: [PATCH] AudioService: Unmute Le Audio devices when activated Since the mute state is not being stored individually for each device type and the volume level is, only volume level is restored on active audio device change and mute level can either be derived from the volume level (when reaches 0), be left unchanged from the previous device type, or unmuted automatically. Leaving LE Audio devices muted can cause some issues with the additional manual unmuting and is inconsistent with the BT classic earbuds experience. Bug: 273276001 Test: manual testing - mute when on speaker, then connect LE Audio earbuds Change-Id: Ic6795092ec50befc5f796a844e552f4df9df6d8b --- services/core/java/com/android/server/audio/AudioService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 5ca03b8e6f8ba..571bd4eeb492e 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -7232,6 +7232,7 @@ public class AudioService extends IAudioService.Stub DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_LINE); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_A2DP_SET); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_BLE_SET); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_USB_SET); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_HDMI); }