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

Commit 3069ff58 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Streamline BTM_GetNumAclLinks and acl_get_supported_packet_types am:...

Streamline BTM_GetNumAclLinks and acl_get_supported_packet_types am: 0534c27c am: ec351c68 am: bfec81b1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1568976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic538db2ff93c40881c7f3879085c112ec27ceb19
parents 084c4392 bfec81b1
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -1199,18 +1199,6 @@ tBTM_STATUS BTM_ReadAutomaticFlushTimeout(const RawAddress& remote_bda,
tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
                            tBT_TRANSPORT transport, tBTM_CMPL_CB* p_cb);
                            tBT_TRANSPORT transport, tBTM_CMPL_CB* p_cb);


/*******************************************************************************
 *
 * Function         BTM_GetNumAclLinks
 *
 * Description      This function is called to count the number of
 *                  ACL links that are active.
 *
 * Returns          uint16_t Number of active ACL links
 *
 ******************************************************************************/
uint16_t BTM_GetNumAclLinks(void);

/*****************************************************************************
/*****************************************************************************
 *  (e)SCO CHANNEL MANAGEMENT FUNCTIONS
 *  (e)SCO CHANNEL MANAGEMENT FUNCTIONS
 ****************************************************************************/
 ****************************************************************************/
+2 −8
Original line number Original line Diff line number Diff line
@@ -1191,13 +1191,7 @@ uint16_t BTM_GetNumAclLinks(void) {
  if (bluetooth::shim::is_gd_l2cap_enabled()) {
  if (bluetooth::shim::is_gd_l2cap_enabled()) {
    return bluetooth::shim::L2CA_GetNumLinks();
    return bluetooth::shim::L2CA_GetNumLinks();
  }
  }
  uint16_t num_acl = 0;
  return static_cast<uint16_t>(btm_cb.acl_cb_.NumberOfActiveLinks());

  for (uint16_t i = 0; i < MAX_L2CAP_LINKS; ++i) {
    if (btm_cb.acl_cb_.acl_db[i].in_use) ++num_acl;
  }

  return num_acl;
}
}


/*******************************************************************************
/*******************************************************************************
@@ -2524,7 +2518,7 @@ bool acl_is_role_switch_allowed() {
}
}


uint16_t acl_get_supported_packet_types() {
uint16_t acl_get_supported_packet_types() {
  return btm_cb.acl_cb_.btm_acl_pkt_types_supported;
  return btm_cb.acl_cb_.DefaultPacketTypes();
}
}


bool acl_set_peer_le_features_from_handle(uint16_t hci_handle,
bool acl_set_peer_le_features_from_handle(uint16_t hci_handle,