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

Commit f77bc13f authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Re-route read LE local/remote address to L2cap am: ecff4335 am: 5faf597d am: 57a428d4

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94d34140641c8a182e01ac88d3a648457bafc100
parents 8304c668 57a428d4
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -2329,6 +2329,13 @@ void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
    return bluetooth::shim::BTM_ReadConnectionAddr(remote_bda, local_conn_addr,
    return bluetooth::shim::BTM_ReadConnectionAddr(remote_bda, local_conn_addr,
                                                   p_addr_type);
                                                   p_addr_type);
  }
  }

  if (bluetooth::shim::is_gd_l2cap_enabled()) {
    bluetooth::shim::L2CA_ReadConnectionAddr(remote_bda, local_conn_addr,
                                             p_addr_type);
    return;
  }

  tACL_CONN* p_acl = internal_.btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);


  if (p_acl == NULL) {
  if (p_acl == NULL) {
@@ -2485,6 +2492,12 @@ bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr,
    return bluetooth::shim::BTM_ReadRemoteConnectionAddr(pseudo_addr, conn_addr,
    return bluetooth::shim::BTM_ReadRemoteConnectionAddr(pseudo_addr, conn_addr,
                                                         p_addr_type);
                                                         p_addr_type);
  }
  }

  if (bluetooth::shim::is_gd_l2cap_enabled()) {
    return bluetooth::shim::L2CA_ReadRemoteConnectionAddr(
        pseudo_addr, conn_addr, p_addr_type);
  }

  bool st = true;
  bool st = true;
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(pseudo_addr, BT_TRANSPORT_LE);
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(pseudo_addr, BT_TRANSPORT_LE);


+11 −0
Original line number Original line Diff line number Diff line
@@ -85,6 +85,17 @@ bool bluetooth::shim::L2CA_IsLeLink(uint16_t) {
  mock_function_count_map[__func__]++;
  mock_function_count_map[__func__]++;
  return false;
  return false;
}
}
void bluetooth::shim::L2CA_ReadConnectionAddr(const RawAddress& pseudo_addr,
                                              RawAddress& conn_addr,
                                              uint8_t* p_addr_type) {
  mock_function_count_map[__func__]++;
}
bool bluetooth::shim::L2CA_ReadRemoteConnectionAddr(
    const RawAddress& pseudo_addr, RawAddress& conn_addr,
    uint8_t* p_addr_type) {
  mock_function_count_map[__func__]++;
  return false;
}
bool bluetooth::shim::L2CA_ReconfigCreditBasedConnsReq(
bool bluetooth::shim::L2CA_ReconfigCreditBasedConnsReq(
    const RawAddress& bd_addr, std::vector<uint16_t>& lcids,
    const RawAddress& bd_addr, std::vector<uint16_t>& lcids,
    tL2CAP_LE_CFG_INFO* p_cfg) {
    tL2CAP_LE_CFG_INFO* p_cfg) {