Merge "AS: Fix sometimes invalid volume set to LE Audio devices" am: f38b225284
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2502315 Change-Id: I2edf78c65c13e13bde7dc4bf8e897def70c18055 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -4087,13 +4087,14 @@ public class AudioService extends IAudioService.Stub
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forcefully set LE audio volume as a workaround, since in some cases
|
// In some cases (like the outgoing or rejected call) the value of 'device' is not
|
||||||
// (like the outgoing call) the value of 'device' is not DEVICE_OUT_BLE_*
|
// DEVICE_OUT_BLE_* even when BLE is connected. Changing the volume level in such case
|
||||||
// even when BLE is connected.
|
// may cuase the other devices volume level leaking into the LeAudio device settings.
|
||||||
if (!AudioSystem.isLeAudioDeviceType(device)) {
|
if (!AudioSystem.isLeAudioDeviceType(device)) {
|
||||||
Log.w(TAG, "setLeAudioVolumeOnModeUpdate got unexpected device=" + device
|
Log.w(TAG, "setLeAudioVolumeOnModeUpdate ignoring invalid device="
|
||||||
+ ", forcing to device=" + AudioSystem.DEVICE_OUT_BLE_HEADSET);
|
+ device + ", mode=" + mode + ", index=" + index + " maxIndex=" + maxIndex
|
||||||
device = AudioSystem.DEVICE_OUT_BLE_HEADSET;
|
+ " streamType=" + streamType);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG_VOL) {
|
if (DEBUG_VOL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user