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

Commit bbebe980 authored by Chris Manton's avatar Chris Manton
Browse files

[7/25] bta::hh Use stack::l2cap::get_interface()

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

Change-Id: Ib41cba8e0ad78ee2b7ef2575c8b3a360334fdd14
parent 6d6f9f92
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/btm_status.h"
#include "stack/include/l2c_api.h"  // L2CA_
#include "stack/include/l2cap_interface.h"
#include "stack/include/main_thread.h"
#include "stack/include/srvc_api.h"  // tDIS_VALUE
#include "types/bluetooth/uuid.h"
@@ -1355,7 +1355,8 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint

  // Make sure both min, and max are bigger than 11.25ms, lower values can
  // introduce audio issues if A2DP is also active.
  L2CA_AdjustConnectionIntervals(&min_interval, &max_interval, BTM_BLE_CONN_INT_MIN_LIMIT);
  stack::l2cap::get_interface().L2CA_AdjustConnectionIntervals(&min_interval, &max_interval,
                                                               BTM_BLE_CONN_INT_MIN_LIMIT);

  // If the device has no preferred connection timeout, use the default.
  if (timeout == BTM_BLE_CONN_PARAM_UNDEF) {
@@ -1387,8 +1388,8 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint

  get_btm_client_interface().ble.BTM_BleSetPrefConnParams(
          p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency, timeout);
  if (!L2CA_UpdateBleConnParams(p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency,
                                timeout, 0, 0)) {
  if (!stack::l2cap::get_interface().L2CA_UpdateBleConnParams(
              p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency, timeout, 0, 0)) {
    log::warn("Unable to update L2CAP ble connection params peer:{}",
              p_dev_cb->link_spec.addrt.bda);
  }
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
#include "macros.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/hiddefs.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_types.h"
#include "types/ble_address_with_type.h"
#include "types/bluetooth/uuid.h"