Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be5f4e7e authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Check for SCO devices for STREAM_VOICE_CALL when determining routedToBluetooth" into main

parents 9f00e761 1bbfeb9e
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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;
    }