uint16_t connection_handle);
void btm_ble_increment_link_topology_mask(uint8_t link_role);
+bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type);
+
static bool acl_ble_common_connection(const tBLE_BD_ADDR& address_with_type,
uint16_t handle, uint8_t role,
bool is_in_security_db,
btm_ble_advertiser_notify_terminated_legacy(HCI_SUCCESS, handle);
}
+static bool maybe_resolve_received_address(
+ const tBLE_BD_ADDR& address_with_type,
+ tBLE_BD_ADDR* resolved_address_with_type) {
+ ASSERT(resolved_address_with_type != nullptr);
+
+ *resolved_address_with_type = address_with_type;
+ return maybe_resolve_address(&resolved_address_with_type->bda,
+ &resolved_address_with_type->type);
+}
+
void acl_ble_enhanced_connection_complete_from_shim(
const tBLE_BD_ADDR& address_with_type, uint16_t handle, uint8_t role,
uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout,
const RawAddress& local_rpa, const RawAddress& peer_rpa,
uint8_t peer_addr_type) {
- bool match = false; // TODO look up in database
- acl_ble_enhanced_connection_complete(
- address_with_type, handle, role, match, conn_interval, conn_latency,
- conn_timeout, local_rpa, peer_rpa, peer_addr_type);
+ tBLE_BD_ADDR resolved_address_with_type;
+ const bool is_in_security_db = maybe_resolve_received_address(
+ address_with_type, &resolved_address_with_type);
+
+ acl_ble_enhanced_connection_complete(resolved_address_with_type, handle, role,
+ is_in_security_db, conn_interval,
+ conn_latency, conn_timeout, local_rpa,
+ peer_rpa, peer_addr_type);
// The legacy stack continues the LE connection after the read remote version
// complete has been received.