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

Commit 713dad66 authored by Omair Kamil's avatar Omair Kamil Committed by Gerrit Code Review
Browse files

Merge "Clean up BtaGattQueue when connected" into main

parents 6371b8a3 eea12fe3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <base/functional/callback.h>
#include <base/strings/string_number_conversions.h>
#include <bluetooth/log.h>
#include <com_android_bluetooth_flags.h>
#include <hardware/bt_csis.h>
#include <hardware/bt_gatt_types.h>
#include <stdio.h>
@@ -1918,7 +1919,9 @@ private:

    device->connecting_actively = false;
    device->conn_id = evt.conn_id;

    if (com::android::bluetooth::flags::gatt_queue_cleanup_connected()) {
      BtaGattQueue::Clean(evt.conn_id);
    }
    /* Verify bond */
    if (BTM_SecIsSecurityPending(device->addr)) {
      /* if security collision happened, wait for encryption done
+3 −1
Original line number Diff line number Diff line
@@ -2008,7 +2008,9 @@ private:
    }

    device->conn_id = evt.conn_id;

    if (com::android::bluetooth::flags::gatt_queue_cleanup_connected()) {
      BtaGattQueue::Clean(evt.conn_id);
    }
    if (BTM_SecIsSecurityPending(device->addr)) {
      /* if security collision happened, wait for encryption done
       * (BTA_GATTC_ENC_CMPL_CB_EVT)
+4 −0
Original line number Diff line number Diff line
@@ -524,6 +524,10 @@ public:

    hearingDevice->conn_id = conn_id;

    if (com::android::bluetooth::flags::gatt_queue_cleanup_connected()) {
      BtaGattQueue::Clean(conn_id);
    }

    uint64_t hi_sync_id = hearingDevice->hi_sync_id;

    // If there a background connection to the other device of a pair, promote
+3 −0
Original line number Diff line number Diff line
@@ -2309,6 +2309,9 @@ public:

    leAudioDevice->conn_id_ = conn_id;
    leAudioDevice->mtu_ = mtu;
    if (com::android::bluetooth::flags::gatt_queue_cleanup_connected()) {
      BtaGattQueue::Clean(conn_id);
    }

    /* Remove device from the background connect (it might be either Allow list
     * or TA) and add it again with reconnection_mode_. In case it is TA, we are