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

Commit bb802ae3 authored by Chelsea Hao's avatar Chelsea Hao Committed by Android (Google) Code Review
Browse files

Merge "[Audiosharing] Allow updateBroadcast with programInfo from settings provider." into main

parents b4b858f2 cb213ae4
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -758,6 +758,20 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {
        mServiceBroadcast.updateBroadcast(mBroadcastId, mBluetoothLeAudioContentMetadata);
    }

    /**
     * Update the LE Broadcast by calling {@link BluetoothLeBroadcast#updateBroadcast(int,
     * BluetoothLeAudioContentMetadata)}, currently only updates programInfo.
     */
    public void updateBroadcast() {
        if (mServiceBroadcast == null) {
            Log.d(TAG, "The BluetoothLeBroadcast is null when updating the broadcast.");
            return;
        }
        String programInfo = getProgramInfo();
        mBluetoothLeAudioContentMetadata = mBuilder.setProgramInfo(programInfo).build();
        mServiceBroadcast.updateBroadcast(mBroadcastId, mBluetoothLeAudioContentMetadata);
    }

    /**
     * Register Broadcast Callbacks to track its state and receivers
     *