}
static tBTA_DM_PEER_DEVICE* allocate_device_for(const RawAddress& bd_addr,
- tBT_TRANSPORT transport,
- uint16_t handle) {
+ tBT_TRANSPORT transport) {
for (uint8_t i = 0; i < bta_dm_cb.device_list.count; i++) {
auto device = &bta_dm_cb.device_list.peer_device[i];
- if (device->peer_bdaddr == bd_addr && device->conn_handle == handle) {
+ if (device->peer_bdaddr == bd_addr && device->transport == transport) {
return device;
}
}
&bta_dm_cb.device_list.peer_device[bta_dm_cb.device_list.count];
device->peer_bdaddr = bd_addr;
bta_dm_cb.device_list.count++;
- device->conn_handle = handle;
if (transport == BT_TRANSPORT_LE) {
bta_dm_cb.device_list.le_count++;
}
return nullptr;
}
-static void bta_dm_acl_up(const RawAddress& bd_addr, tBT_TRANSPORT transport,
- uint16_t handle) {
- auto device = allocate_device_for(bd_addr, transport, handle);
+static void bta_dm_acl_up(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
+ auto device = allocate_device_for(bd_addr, transport);
if (device == nullptr) {
APPL_TRACE_ERROR("%s max active connection reached, no resources",
__func__);
bta_dm_adjust_roles(true);
}
-void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport,
- uint16_t handle) {
- do_in_main_thread(FROM_HERE,
- base::Bind(bta_dm_acl_up, bd_addr, transport, handle));
+void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport) {
+ do_in_main_thread(FROM_HERE, base::Bind(bta_dm_acl_up, bd_addr, transport));
}
static void bta_dm_acl_down(const RawAddress& bd_addr,
#include "types/bt_transport.h"
#include "types/raw_address.h"
-void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport,
- uint16_t handle);
+void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_acl_down(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_report_role_change(const RawAddress bd_addr, uint8_t new_role,
uint8_t hci_status);