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

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

Merge "[le audio] Update broadcast code if sinks requested" into main

parents d59e15f0 df2e81ec
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.bluetooth.bass_client;
import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;

import static com.android.bluetooth.flags.Flags.leaudioBigDependsOnAudioState;

import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.bluetooth.BluetoothAdapter;
@@ -785,11 +787,11 @@ public class BassClientStateMachine extends StateMachine {

    private void checkAndUpdateBroadcastCode(BluetoothLeBroadcastReceiveState recvState) {
        log("checkAndUpdateBroadcastCode");
        // non colocated case, Broadcast PIN should have been updated from lyaer
        // If there is pending one process it Now
        // Whenever receive state indicated code requested, assistant should set the broadcast code
        // Valid code will be checked later in convertRecvStateToSetBroadcastCodeByteArray
        if (recvState.getBigEncryptionState()
                        == BluetoothLeBroadcastReceiveState.BIG_ENCRYPTION_STATE_CODE_REQUIRED
                && mSetBroadcastCodePending) {
                && (leaudioBigDependsOnAudioState() || mSetBroadcastCodePending)) {
            log("Update the Broadcast now");
            if (mSetBroadcastPINMetadata != null) {
                setCurrentBroadcastMetadata(recvState.getSourceId(), mSetBroadcastPINMetadata);