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

Commit 9b00fbc2 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "Add Broadcast Profile bitmask to the supported mask if supported" am:...

Merge "Add Broadcast Profile bitmask to the supported mask if supported" am: aed74b76 am: def3d6fd am: b8322535 am: d0ce89e0 am: 5ef0c9ab

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2063245



Change-Id: I3687f6821ae5bd3ededb3995bf9f354a805d96d3
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c0f40b8b 5ef0c9ab
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -736,6 +736,10 @@ public class AdapterService extends Service {
            nonSupportedProfiles.add(BassClientService.class);
        }

        if (isLeAudioBroadcastSourceSupported()) {
            Config.addSupportedProfile(BluetoothProfile.LE_AUDIO_BROADCAST);
        }

        if (!nonSupportedProfiles.isEmpty()) {
            // Remove non-supported profiles from the supported list
            // since the controller doesn't support
+6 −1
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ public class Config {

    private static final String FEATURE_HEARING_AID = "settings_bluetooth_hearing_aid";
    private static final String FEATURE_BATTERY = "settings_bluetooth_battery";
    private static long sSupportedMask = 0;

    private static class ProfileConfig {
        Class mClass;
@@ -197,6 +198,10 @@ public class Config {
        sSupportedProfiles = profilesList.toArray(new Class[profilesList.size()]);
    }

    static void addSupportedProfile(int supportedProfile) {
        sSupportedMask |= (1 << supportedProfile);
    }

    static HashSet<Class> geLeAudioUnicastProfiles() {
        return mLeAudioUnicastProfiles;
    }
@@ -220,7 +225,7 @@ public class Config {
    }

    static long getSupportedProfilesBitMask() {
        long mask = 0;
        long mask = sSupportedMask;
        for (final Class profileClass : getSupportedProfiles()) {
            mask |= getProfileMask(profileClass);
        }