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

Commit a3f83640 authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

le_audio_test_app: Fix crash when broadcaster not supported

Bug: 150670922
Tag: #feature
Test: manual - recompile the app and run
Sponsor: jpawlowski@
Change-Id: Icfdd82ab75d743264d685522f3c9825e07a2d5da
parent 7e8d453e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -998,6 +998,7 @@ public class BluetoothProxy {
    }
    }


    private void initLeAudioBroadcastProxy() {
    private void initLeAudioBroadcastProxy() {
        if (!isLeAudioBroadcastSourceSupported()) return;
        if (mBluetoothLeBroadcast == null) {
        if (mBluetoothLeBroadcast == null) {
            bluetoothAdapter.getProfileProxy(this.application, profileListener,
            bluetoothAdapter.getProfileProxy(this.application, profileListener,
                    BluetoothProfile.LE_AUDIO_BROADCAST);
                    BluetoothProfile.LE_AUDIO_BROADCAST);
@@ -1005,6 +1006,7 @@ public class BluetoothProxy {
    }
    }


    private void cleanupLeAudioBroadcastProxy() {
    private void cleanupLeAudioBroadcastProxy() {
        if (!isLeAudioBroadcastSourceSupported()) return;
        if (mBluetoothLeBroadcast != null) {
        if (mBluetoothLeBroadcast != null) {
            bluetoothAdapter.closeProfileProxy(BluetoothProfile.LE_AUDIO_BROADCAST,
            bluetoothAdapter.closeProfileProxy(BluetoothProfile.LE_AUDIO_BROADCAST,
                    mBluetoothLeBroadcast);
                    mBluetoothLeBroadcast);