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

Commit 1be61191 authored by Łukasz Rymanowski (xWF)'s avatar Łukasz Rymanowski (xWF) Committed by Gerrit Code Review
Browse files

Merge changes Ic21b633e,I5d0c5036 into main

* changes:
  bta: le_audio: state_machine_test: Factor out DevicePacsInit method
  bta: le_audio: Set connection state prior ProcessHciNotifAclDisconnected
parents dae8385f 58b5e436
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2465,13 +2465,17 @@ public:
    leAudioDevice->encrypted_ = false;
    leAudioDevice->acl_phy_update_done_ = false;

    auto connection_state = leAudioDevice->GetConnectionState();

    leAudioDevice->SetConnectionState(DeviceConnectState::DISCONNECTED);

    groupStateMachine_->ProcessHciNotifAclDisconnected(group, leAudioDevice);

    bluetooth::le_audio::MetricsCollector::Get()->OnConnectionStateChanged(
            leAudioDevice->group_id_, address, ConnectionState::DISCONNECTED,
            bluetooth::le_audio::ConnectionStatus::SUCCESS);

    if (leAudioDevice->GetConnectionState() == DeviceConnectState::REMOVING) {
    if (connection_state == DeviceConnectState::REMOVING) {
      if (leAudioDevice->group_id_ != bluetooth::groups::kGroupUnknown) {
        auto group = aseGroups_.FindById(leAudioDevice->group_id_);
        group_remove_node(group, address, true);
@@ -2480,7 +2484,6 @@ public:
      return;
    }

    auto connection_state = leAudioDevice->GetConnectionState();
    log::info("{}, autoconnect {}, reason 0x{:02x}, connection state {}", leAudioDevice->address_,
              leAudioDevice->autoconnect_flag_, reason,
              bluetooth::common::ToString(connection_state));
@@ -2496,8 +2499,6 @@ public:
      return;
    }

    leAudioDevice->SetConnectionState(DeviceConnectState::DISCONNECTED);

    /* Attempt background re-connect if disconnect was not initiated locally
     * or if autoconnect is set and device got disconnected because of some
     * issues
+139 −114

File changed.

Preview size limit exceeded, changes collapsed.