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

Commit c045cad2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "broadcaster: Add missing null checks at client side" am: 3147fafa am:...

Merge "broadcaster: Add missing null checks at client side" am: 3147fafa am: 131edeea am: 7d8a5374

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



Change-Id: I39bce832d21d52d0cc6b2c8c07f5ca062f7b94c4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 68886588 7d8a5374
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -542,8 +542,8 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
     *
     * @param contentMetadata metadata for the default Broadcast subgroup
     * @param broadcastCode Encryption will be enabled when <var>broadcastCode</var> is not null
     * @throws IllegalArgumentException if <var>contentMetadata</var> is null
     * @throws IllegalStateException if callback was not registered
     * @throws NullPointerException if <var>contentMetadata</var> is null
     * @hide
     */
    @SystemApi
@@ -554,6 +554,8 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
    })
    public void startBroadcast(@NonNull BluetoothLeAudioContentMetadata contentMetadata,
            @Nullable byte[] broadcastCode) {
        Objects.requireNonNull(contentMetadata, "contentMetadata cannot be null");

        if (DBG) log("startBroadcasting");
        final IBluetoothLeAudio service = getService();
        if (service == null) {
@@ -579,6 +581,7 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
     * @param broadcastId broadcastId as defined by the Basic Audio Profile
     * @param contentMetadata updated metadata for the default Broadcast subgroup
     * @throws IllegalStateException if callback was not registered
     * @throws NullPointerException if <var>contentMetadata</var> is null
     * @hide
     */
    @SystemApi
@@ -589,6 +592,8 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
    })
    public void updateBroadcast(int broadcastId,
            @NonNull BluetoothLeAudioContentMetadata contentMetadata) {
        Objects.requireNonNull(contentMetadata, "contentMetadata cannot be null");

        if (DBG) log("updateBroadcast");
        final IBluetoothLeAudio service = getService();
        if (service == null) {