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

Commit 5c37f4ca authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

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

Merge "LeAudio: Fix switching to not active le audio device" am: ec0d0f37 am: 198b25e6 am: 172cc598

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/2003910

Change-Id: I8756f797b67a0f944d802730dc59d529a6a7b677
parents 49d0e630 172cc598
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);
           }
        }