diff options
| author | 2023-03-29 08:25:21 +0000 | |
|---|---|---|
| committer | 2023-03-29 08:25:21 +0000 | |
| commit | f38b22528454cdb75e2925b69bb1cc550f9d51f2 (patch) | |
| tree | 75b1d059f8205714e68ebc54df5c056ea38cf70e | |
| parent | bb651dc667ce8b39230618ba6859c38529ac4426 (diff) | |
| parent | 6aa213d77ef6c1001fca0c5f889dfcc831bd804e (diff) | |
Merge "AS: Fix sometimes invalid volume set to LE Audio devices"
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 46ab3304c46e..df9a75054e28 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -4087,13 +4087,14 @@ public class AudioService extends IAudioService.Stub return; } - // Forcefully set LE audio volume as a workaround, since in some cases - // (like the outgoing call) the value of 'device' is not DEVICE_OUT_BLE_* - // even when BLE is connected. + // In some cases (like the outgoing or rejected call) the value of 'device' is not + // DEVICE_OUT_BLE_* even when BLE is connected. Changing the volume level in such case + // may cuase the other devices volume level leaking into the LeAudio device settings. if (!AudioSystem.isLeAudioDeviceType(device)) { - Log.w(TAG, "setLeAudioVolumeOnModeUpdate got unexpected device=" + device - + ", forcing to device=" + AudioSystem.DEVICE_OUT_BLE_HEADSET); - device = AudioSystem.DEVICE_OUT_BLE_HEADSET; + Log.w(TAG, "setLeAudioVolumeOnModeUpdate ignoring invalid device=" + + device + ", mode=" + mode + ", index=" + index + " maxIndex=" + maxIndex + + " streamType=" + streamType); + return; } if (DEBUG_VOL) { |