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

Commit 1bbfeb9e authored by Anton Potapov's avatar Anton Potapov
Browse files

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
parent 5620e115
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;
    }