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

Commit 599a17dc authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
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
parent c1c415f8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1357,15 +1357,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) {