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

Commit ec0d0f37 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "LeAudio: Fix switching to not active le audio device"

parents fefea376 c0b036a8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -184,6 +184,16 @@ public class BluetoothStateReceiver extends BroadcastReceiver {
                    return;
                }
                args.arg2 = device.getAddress();

                if (deviceType == BluetoothDeviceManager.DEVICE_TYPE_LE_AUDIO) {
                    /* In Le Audio case, once device got Active, the Telecom needs to make sure it
                     * is set as communication device before we can say that BT_AUDIO_IS_ON
                     */
                    if (!mBluetoothDeviceManager.setLeAudioCommunicationDevice()) {
                        Log.w(LOG_TAG, "Device %s cannot be use as communication device.", device);
                        return;
                    }
                }
                mBluetoothRouteManager.sendMessage(BT_AUDIO_IS_ON, args);
           }
        }