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

Commit d88c76c5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use feature flag to guard Broadcast and Bass client enablement" into main

parents c39cc151 827637b3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.bluetooth.bass_client;

import static android.Manifest.permission.BLUETOOTH_CONNECT;

import static com.android.bluetooth.flags.Flags.leaudioBroadcastFeatureSupport;
import static com.android.bluetooth.Utils.enforceBluetoothPrivilegedPermission;

import android.bluetooth.BluetoothAdapter;
@@ -137,7 +138,8 @@ public class BassClientService extends ProfileService {
    }

    public static boolean isEnabled() {
        return BluetoothProperties.isProfileBapBroadcastAssistEnabled().orElse(false);
        return leaudioBroadcastFeatureSupport()
                && BluetoothProperties.isProfileBapBroadcastAssistEnabled().orElse(false);
    }

    void updatePeriodicAdvertisementResultMap(
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ package com.android.bluetooth.le_audio;
import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.bluetooth.IBluetoothLeAudio.LE_AUDIO_GROUP_ID_INVALID;

import static com.android.bluetooth.flags.Flags.leaudioBroadcastFeatureSupport;
import static com.android.bluetooth.Utils.enforceBluetoothPrivilegedPermission;
import static com.android.modules.utils.build.SdkLevel.isAtLeastU;

@@ -279,7 +280,8 @@ public class LeAudioService extends ProfileService {
    }

    public static boolean isBroadcastEnabled() {
        return BluetoothProperties.isProfileBapBroadcastSourceEnabled().orElse(false);
        return leaudioBroadcastFeatureSupport()
                && BluetoothProperties.isProfileBapBroadcastSourceEnabled().orElse(false);
    }

    private boolean registerTmap() {