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

Commit 644ed958 authored by David Duarte's avatar David Duarte
Browse files

AdapterService: Return LE_AUDIO Binder for LE_AUDIO_BROADCAST

LE_AUDIO_BROADCAST don't have any associated service and uses
LeAudioService Binder.

This fixes a regression introduced by https://r.android.com/2663955

Bug: 317289823
Fix: 317289823
Flag: EXEMPT, Regression caused by unflagged changed
Test: atest BluetoothLeBroadcastTest
Change-Id: I608d3220bf02b389b5ecc4e1af21ae3ab86a61f1
parent 8abac319
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6995,6 +6995,11 @@ public class AdapterService extends Service {
            return null;
        }

        // LE_AUDIO_BROADCAST is not associated with a service and use LE_AUDIO's Binder
        if (profileId == BluetoothProfile.LE_AUDIO_BROADCAST) {
            profileId = BluetoothProfile.LE_AUDIO;
        }

        ProfileService profile = mStartedProfiles.get(profileId);
        if (profile != null) {
            return profile.getBinder();