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

Commit 9cadeba4 authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Allow BTM_BLE_CONN_INT_MIN_LIMIT override by sysprop

For mainline (and VF) builds we want to allow customization for the
BTM_BLE_CONN_INT_MIN_LIMIT through a sysprop. Since it's too late to
have it as an API for T at this point, or it's sepolicy, this will be
properly added in aosp. For T the sepolicy can be added in system_ext
(e.g. for TV it can be added in
device/google/atv/sepolicy/system_ext/private).

Bug: 237014662
Test: local build with sysprop
Ignore-AOSP-First: TM only fix
Change-Id: I8b2dafeaebf4fa8fae434bff0c937db9c14f3f9b
parent 0f059ddb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include "osi/include/allocator.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/acl_api.h"
@@ -1586,7 +1587,9 @@ tL2CAP_LE_RESULT_CODE l2ble_sec_access_req(const RawAddress& bd_addr,
void L2CA_AdjustConnectionIntervals(uint16_t* min_interval,
                                    uint16_t* max_interval,
                                    uint16_t floor_interval) {
  uint16_t phone_min_interval = floor_interval;
  // Allow for customization by systemprops for mainline
  uint16_t phone_min_interval = (uint16_t)osi_property_get_int32(
      "bluetooth.core.gap.le.conn.min.limit", (int32_t)floor_interval);

  if (HearingAid::GetDeviceCount() > 0) {
    // When there are bonded Hearing Aid devices, we will constrained this