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

Commit 840c738f authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioDeviceBroker: fix createBtDeviceInfo for HEADSET profile

Add missing support for HEADSET profile in createBtDeviceInfo.

Bug: 344014463
Test: repro steps in bug
Flag: EXAPT trivial bug fix
Change-Id: Ib5c869339a40b1877e55951aafe717e77421ecf5
parent 4dde0d73
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -966,6 +966,11 @@ public class AudioDeviceBroker {
            case BluetoothProfile.LE_AUDIO_BROADCAST:
                audioDevice = AudioSystem.DEVICE_OUT_BLE_BROADCAST;
                break;
            case BluetoothProfile.HEADSET:
                // the actual device type is not important at this point and
                // will be set by BtHelper.handleBtScoActiveDeviceChange()
                audioDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
                break;
            default: throw new IllegalArgumentException("Invalid profile " + d.mInfo.getProfile());
        }
        return new BtDeviceInfo(d, device, state, audioDevice, codec);