diff options
| author | 2024-09-11 17:55:07 +0100 | |
|---|---|---|
| committer | 2024-09-11 17:55:07 +0100 | |
| commit | 1bbfeb9e73dbd5ec41f491a5878f396bad70c07f (patch) | |
| tree | 6415e25e224e6e1ed832f65f6be415208fbf9599 | |
| parent | 5620e115b93654c2891ed9e9f45b6c68333edf43 (diff) | |
Check for SCO devices for STREAM_VOICE_CALL when determining routedToBluetooth
Flag: EXEMPT BUGFIX
Fixes: 365673126
Test: atest VolumeDialogControllerImpl
Test: manual on the foldable. Join a call with a compatible headset and
adjust volume
Change-Id: I6b535d6debb3479eba5b49136d564684846376c1
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java index d9e72bf592a0..768fda949a4a 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java @@ -539,10 +539,12 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa != 0; changed |= updateStreamRoutedToBluetoothW(stream, routedToBluetooth); } else if (stream == AudioManager.STREAM_VOICE_CALL) { - final boolean routedToBluetooth = - (mAudio.getDevicesForStream(AudioManager.STREAM_VOICE_CALL) - & AudioManager.DEVICE_OUT_BLE_HEADSET) != 0; - changed |= updateStreamRoutedToBluetoothW(stream, routedToBluetooth); + final int devices = mAudio.getDevicesForStream(AudioManager.STREAM_VOICE_CALL); + final int bluetoothDevicesMask = (AudioManager.DEVICE_OUT_BLE_HEADSET + | AudioManager.DEVICE_OUT_BLUETOOTH_SCO_HEADSET + | AudioManager.DEVICE_OUT_BLUETOOTH_SCO_CARKIT); + changed |= updateStreamRoutedToBluetoothW(stream, + (devices & bluetoothDevicesMask) != 0); } return changed; } |