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

Commit f5820745 authored by Patty Huang's avatar Patty Huang
Browse files

Update active context config when the ACL is disconnected

update the active config when the ACL is disconnected despite the group
state is in idle mode

Bug: 236253643
Test: atest bluetooth_le_audio_client_test

Change-Id: I598e8270a928c9dee1d47603b3bf8a2a48e251fe
(cherry picked from commit ed25ef10)
Merged-In: I598e8270a928c9dee1d47603b3bf8a2a48e251fe
(cherry picked from commit 5dd80e98)
parent d0fe24b7
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -579,6 +579,7 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
    if ((group->GetState() == AseState::BTA_LE_AUDIO_ASE_STATE_IDLE) &&
        (group->GetTargetState() == AseState::BTA_LE_AUDIO_ASE_STATE_IDLE)) {
      LOG(INFO) << __func__ << " group: " << group->group_id_ << " is in IDLE";
      group->UpdateActiveContextsMap();
      return;
    }

@@ -609,10 +610,10 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
    /* mark ASEs as not used. */
    leAudioDevice->DeactivateAllAses();

    DLOG(INFO) << __func__ << " device: " << leAudioDevice->address_
               << " group connected: " << group->IsAnyDeviceConnected()
               << " all active ase disconnected: "
               << group->HaveAllActiveDevicesCisDisc();
    LOG_DEBUG(
        " device: %s, group connected: %d, all active ase disconnected:: %d",
        leAudioDevice->address_.ToString().c_str(),
        group->IsAnyDeviceConnected(), group->HaveAllActiveDevicesCisDisc());

    /* Group has changed. Lets update available contexts */
    group->UpdateActiveContextsMap();