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

Commit 527021bb authored by Hui Peng's avatar Hui Peng
Browse files

[Invisalign2] Modify Argument type of btm_sec_conn_req

Bug: 301661850
Test: m com.android.btservices
Change-Id: I3b3862007d5f1b50aa4c8dc3d9da6c779a24fe6d
parent f537d521
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@

#include <string>

#include "bt_dev_class.h"
#include "btif/include/btif_storage.h"
#include "common/init_flags.h"
#include "common/metrics.h"
@@ -2048,7 +2049,7 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
 * Returns          void
 *
 ******************************************************************************/
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;

  /* Some device may request a connection before we are done with the HCI_Reset
@@ -2073,7 +2074,7 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
  /* Host is not interested or approved connection.  Save BDA and DC and */
  /* pass request to L2CAP */
  btm_sec_cb.connecting_bda = bda;
  memcpy(btm_sec_cb.connecting_dc, dc, DEV_CLASS_LEN);
  memcpy(btm_sec_cb.connecting_dc, &dc, DEV_CLASS_LEN);

  p_dev_rec = btm_find_or_alloc_dev(bda);
  p_dev_rec->sm4 |= BTM_SM4_CONN_PEND;
+1 −1
Original line number Diff line number Diff line
@@ -452,7 +452,7 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
 * Returns          void
 *
 ******************************************************************************/
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc);
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc);

/*******************************************************************************
 *
+1 −1
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec) {
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::btm_sec_clear_ble_keys(p_dev_rec);
}
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::btm_sec_conn_req(bda, dc);
}
+5 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <string>

// Original included files, if any
#include "bt_dev_class.h"
#include "stack/btm/security_device_record.h"
#include "stack/include/bt_device_type.h"
#include "stack/include/btm_status.h"
@@ -567,12 +568,12 @@ struct btm_sec_clear_ble_keys {
extern struct btm_sec_clear_ble_keys btm_sec_clear_ble_keys;

// Name: btm_sec_conn_req
// Params: const RawAddress& bda, uint8_t* dc
// Params: const RawAddress& bda, const DEV_CLASS dc
// Return: void
struct btm_sec_conn_req {
  std::function<void(const RawAddress& bda, uint8_t* dc)> body{
      [](const RawAddress& bda, uint8_t* dc) {}};
  void operator()(const RawAddress& bda, uint8_t* dc) { body(bda, dc); };
  std::function<void(const RawAddress& bda, const DEV_CLASS dc)> body{
      [](const RawAddress& bda, const DEV_CLASS dc) {}};
  void operator()(const RawAddress& bda, const DEV_CLASS dc) { body(bda, dc); };
};
extern struct btm_sec_conn_req btm_sec_conn_req;