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

Commit 7536c0b5 authored by Chris Manton's avatar Chris Manton
Browse files

[15/25] stack::btm::dev Use stack::l2cap::get_interface()

Bug: 343808590
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: Idc9dce1358d0778ced39291dec7be17138a3bde5
parent 0f802d7e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include "stack/include/btm_ble_privacy.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/l2cap_interface.h"
#include "types/raw_address.h"

using namespace bluetooth;
@@ -514,7 +515,7 @@ void btm_dev_consolidate_existing_connections(const RawAddress& bd_addr) {
      wipe_secrets_and_remove(p_dev_rec);

      btm_acl_consolidate(bd_addr, ble_conn_addr);
      L2CA_Consolidate(bd_addr, ble_conn_addr);
      stack::l2cap::get_interface().L2CA_Consolidate(bd_addr, ble_conn_addr);
      gatt_consolidate(bd_addr, ble_conn_addr);
      if (btm_consolidate_cb) {
        btm_consolidate_cb(bd_addr, ble_conn_addr);
@@ -522,7 +523,7 @@ void btm_dev_consolidate_existing_connections(const RawAddress& bd_addr) {

      /* To avoid race conditions between central/peripheral starting encryption
       * at same time, initiate it just from central. */
      if (L2CA_GetBleConnRole(ble_conn_addr) == HCI_ROLE_CENTRAL) {
      if (stack::l2cap::get_interface().L2CA_GetBleConnRole(ble_conn_addr) == HCI_ROLE_CENTRAL) {
        log::info("Will encrypt existing connection");
        BTM_SetEncryption(bd_addr, BT_TRANSPORT_LE, nullptr, nullptr, BTM_BLE_SEC_ENCRYPT);
      }