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

Commit ff04a82b authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Cherrypicker Worker
Browse files

leaudio: Fix disconnection on timeout

With this patch, if LeAudio code decides to for ACL disconnection,
it will always notifies GATT about the disconnection.

Bug: 266789088
Test: manual
Tag: #feature
Change-Id: I3ebc9d117940f3badb3a022a1a239ad6ff489ff6
(cherry picked from commit 599a17dc)
Merged-In: I3ebc9d117940f3badb3a022a1a239ad6ff489ff6
parent c0fb27f8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1350,15 +1350,15 @@ class LeAudioClientImpl : public LeAudioClient {

    leAudioDevice->SetConnectionState(DeviceConnectState::DISCONNECTING);

    if (acl_force_disconnect) {
      leAudioDevice->DisconnectAcl();
      return;
    }

    BtaGattQueue::Clean(leAudioDevice->conn_id_);
    BTA_GATTC_Close(leAudioDevice->conn_id_);
    leAudioDevice->conn_id_ = GATT_INVALID_CONN_ID;
    leAudioDevice->mtu_ = 0;

    /* Remote in bad state, force ACL Disconnection. */
    if (acl_force_disconnect) {
      leAudioDevice->DisconnectAcl();
    }
  }

  void DeregisterNotifications(LeAudioDevice* leAudioDevice) {