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

Commit dfd112ed authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix disconnection on timeout"

parents d754f039 599a17dc
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) {