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

Commit b140a764 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "legacy: Const-ify btm_set_" am: 19a6b14f

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1913035

Change-Id: I1ee57ce403ec4948bcc276cdeb6554b277a05674
parents 3be26385 19a6b14f
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -2004,7 +2004,7 @@ static void btm_sec_bond_cancel_complete(void) {
 * Returns          void
 *
 ******************************************************************************/
void btm_create_conn_cancel_complete(uint8_t* p) {
void btm_create_conn_cancel_complete(const uint8_t* p) {
  uint8_t status;
  STREAM_TO_UINT8(status, p);
  RawAddress bd_addr;
@@ -2185,7 +2185,8 @@ bool is_state_getting_name(void* data, void* context) {
 *
 ******************************************************************************/
void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                       uint8_t* p_bd_name, tHCI_STATUS status) {
                                       const uint8_t* p_bd_name,
                                       tHCI_STATUS status) {
  tBTM_SEC_DEV_REC* p_dev_rec;
  int i;
  DEV_CLASS dev_class;
@@ -2215,7 +2216,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,

  /* Commenting out trace due to obf/compilation problems.
   */
  if (!p_bd_name) p_bd_name = (uint8_t*)"";
  if (!p_bd_name) p_bd_name = (const uint8_t*)"";

  if (p_dev_rec) {
    BTM_TRACE_EVENT(
@@ -2232,7 +2233,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
  if (p_dev_rec) {
    old_sec_state = p_dev_rec->sec_state;
    if (status == HCI_SUCCESS) {
      strlcpy((char*)p_dev_rec->sec_bd_name, (char*)p_bd_name,
      strlcpy((char*)p_dev_rec->sec_bd_name, (const char*)p_bd_name,
              BTM_MAX_REM_BD_NAME_LEN + 1);
      p_dev_rec->sec_flags |= BTM_SEC_NAME_KNOWN;
      BTM_TRACE_EVENT("setting BTM_SEC_NAME_KNOWN sec_flags:0x%x",
@@ -2414,7 +2415,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
 * Returns          void
 *
 ******************************************************************************/
void btm_sec_rmt_host_support_feat_evt(uint8_t* p) {
void btm_sec_rmt_host_support_feat_evt(const uint8_t* p) {
  tBTM_SEC_DEV_REC* p_dev_rec;
  RawAddress bd_addr; /* peer address */
  BD_FEATURES features;
@@ -2630,7 +2631,7 @@ void btm_io_capabilities_req(const RawAddress& p) {
 * Returns          void
 *
 ******************************************************************************/
void btm_io_capabilities_rsp(uint8_t* p) {
void btm_io_capabilities_rsp(const uint8_t* p) {
  tBTM_SEC_DEV_REC* p_dev_rec;
  tBTM_SP_IO_RSP evt_data;

@@ -2691,7 +2692,7 @@ void btm_io_capabilities_rsp(uint8_t* p) {
 * Returns          void
 *
 ******************************************************************************/
void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) {
void btm_proc_sp_req_evt(tBTM_SP_EVT event, const uint8_t* p) {
  tBTM_STATUS status = BTM_ERR_PROCESSING;
  tBTM_SP_EVT_DATA evt_data;
  RawAddress& p_bda = evt_data.cfm_req.bd_addr;
@@ -2831,7 +2832,7 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) {
 * Returns          void
 *
 ******************************************************************************/
void btm_simple_pair_complete(uint8_t* p) {
void btm_simple_pair_complete(const uint8_t* p) {
  RawAddress bd_addr;
  tBTM_SEC_DEV_REC* p_dev_rec;
  uint8_t status;
@@ -2894,7 +2895,7 @@ void btm_simple_pair_complete(uint8_t* p) {
 * Returns          void
 *
 ******************************************************************************/
void btm_rem_oob_req(uint8_t* p) {
void btm_rem_oob_req(const uint8_t* p) {
  tBTM_SP_RMT_OOB evt_data;
  tBTM_SEC_DEV_REC* p_dev_rec;
  Octet16 c;
@@ -3930,7 +3931,7 @@ void btm_sec_link_key_notification(const RawAddress& p_bda,
 * Returns          Pointer to the record or NULL
 *
 ******************************************************************************/
void btm_sec_link_key_request(uint8_t* p_event) {
void btm_sec_link_key_request(const uint8_t* p_event) {
  RawAddress bda;

  STREAM_TO_BDADDR(bda, p_event);
@@ -4082,7 +4083,7 @@ static void btm_sec_pairing_timeout(UNUSED_ATTR void* data) {
 * Returns          Pointer to the record or NULL
 *
 ******************************************************************************/
void btm_sec_pin_code_request(uint8_t* p_event) {
void btm_sec_pin_code_request(const uint8_t* p_event) {
  tBTM_SEC_DEV_REC* p_dev_rec;
  tBTM_CB* p_cb = &btm_cb;
  RawAddress p_bda;
+8 −7
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc);
 * Returns          void
 *
 ******************************************************************************/
void btm_create_conn_cancel_complete(uint8_t* p);
void btm_create_conn_cancel_complete(const uint8_t* p);

/*******************************************************************************
 *
@@ -494,7 +494,8 @@ bool is_state_getting_name(void* data, void* context);
 *
 ******************************************************************************/
void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                       uint8_t* p_bd_name, tHCI_STATUS status);
                                       const uint8_t* p_bd_name,
                                       tHCI_STATUS status);

/*******************************************************************************
 *
@@ -531,7 +532,7 @@ void btm_io_capabilities_req(const RawAddress& p);
 * Returns          void
 *
 ******************************************************************************/
void btm_io_capabilities_rsp(uint8_t* p);
void btm_io_capabilities_rsp(const uint8_t* p);

/*******************************************************************************
 *
@@ -557,7 +558,7 @@ void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p);
 * Returns          void
 *
 ******************************************************************************/
void btm_simple_pair_complete(uint8_t* p);
void btm_simple_pair_complete(const uint8_t* p);

/*******************************************************************************
 *
@@ -569,7 +570,7 @@ void btm_simple_pair_complete(uint8_t* p);
 * Returns          void
 *
 ******************************************************************************/
void btm_rem_oob_req(uint8_t* p);
void btm_rem_oob_req(const uint8_t* p);

/*******************************************************************************
 *
@@ -673,7 +674,7 @@ void btm_sec_link_key_notification(const RawAddress& p_bda,
 * Returns          Pointer to the record or NULL
 *
 ******************************************************************************/
void btm_sec_link_key_request(uint8_t* p_event);
void btm_sec_link_key_request(const uint8_t* p_event);

/*******************************************************************************
 *
@@ -684,7 +685,7 @@ void btm_sec_link_key_request(uint8_t* p_event);
 * Returns          Pointer to the record or NULL
 *
 ******************************************************************************/
void btm_sec_pin_code_request(uint8_t* p_event);
void btm_sec_pin_code_request(const uint8_t* p_event);

/*******************************************************************************
 *
+10 −10
Original line number Diff line number Diff line
@@ -26,24 +26,24 @@
// This header contains functions for HCIF-Security Management to invoke
//

void btm_create_conn_cancel_complete(uint8_t* p);
void btm_create_conn_cancel_complete(uint8_t* p);
void btm_create_conn_cancel_complete(const uint8_t* p);
void btm_io_capabilities_req(const RawAddress& p);
void btm_io_capabilities_rsp(uint8_t* p);
void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p);
void btm_io_capabilities_rsp(const uint8_t* p);
void btm_proc_sp_req_evt(tBTM_SP_EVT event, const uint8_t* p);
void btm_read_inq_tx_power_complete(uint8_t* p);
void btm_read_local_oob_complete(uint8_t* p);
void btm_rem_oob_req(uint8_t* p);
void btm_rem_oob_req(const uint8_t* p);
void btm_sec_auth_complete(uint16_t handle, tHCI_STATUS status);
void btm_sec_disconnected(uint16_t handle, tHCI_STATUS reason, std::string);
void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status,
                            uint8_t encr_enable);
void btm_sec_link_key_notification(const RawAddress& p_bda,
                                   const Octet16& link_key, uint8_t key_type);
void btm_sec_link_key_request(uint8_t* p_event);
void btm_sec_pin_code_request(uint8_t* p_event);
void btm_sec_rmt_host_support_feat_evt(uint8_t* p);
void btm_sec_link_key_request(const uint8_t* p_event);
void btm_sec_pin_code_request(const uint8_t* p_event);
void btm_sec_rmt_host_support_feat_evt(const uint8_t* p);
void btm_sec_rmt_name_request_complete(const RawAddress* bd_addr,
                                       uint8_t* bd_name, tHCI_STATUS status);
                                       const uint8_t* bd_name,
                                       tHCI_STATUS status);
void btm_sec_update_clock_offset(uint16_t handle, uint16_t clock_offset);
void btm_simple_pair_complete(uint8_t* p);
void btm_simple_pair_complete(const uint8_t* p);
+10 −9
Original line number Diff line number Diff line
@@ -224,22 +224,22 @@ void BTM_SetPinType(uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len) {
void NotifyBondingCanceled(tBTM_STATUS btm_status) {
  mock_function_count_map[__func__]++;
}
void btm_create_conn_cancel_complete(uint8_t* p) {
void btm_create_conn_cancel_complete(const uint8_t* p) {
  mock_function_count_map[__func__]++;
}
void btm_io_capabilities_req(const RawAddress& p) {
  mock_function_count_map[__func__]++;
}
void btm_io_capabilities_rsp(uint8_t* p) {
void btm_io_capabilities_rsp(const uint8_t* p) {
  mock_function_count_map[__func__]++;
}
void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) {
void btm_proc_sp_req_evt(tBTM_SP_EVT event, const uint8_t* p) {
  mock_function_count_map[__func__]++;
}
void btm_read_local_oob_complete(uint8_t* p) {
  mock_function_count_map[__func__]++;
}
void btm_rem_oob_req(uint8_t* p) { mock_function_count_map[__func__]++; }
void btm_rem_oob_req(const uint8_t* p) { mock_function_count_map[__func__]++; }
void btm_sec_abort_access_req(const RawAddress& bd_addr) {
  mock_function_count_map[__func__]++;
}
@@ -275,17 +275,18 @@ void btm_sec_link_key_notification(const RawAddress& p_bda,
                                   const Octet16& link_key, uint8_t key_type) {
  mock_function_count_map[__func__]++;
}
void btm_sec_link_key_request(uint8_t* p_event) {
void btm_sec_link_key_request(const uint8_t* p_event) {
  mock_function_count_map[__func__]++;
}
void btm_sec_pin_code_request(uint8_t* p_event) {
void btm_sec_pin_code_request(const uint8_t* p_event) {
  mock_function_count_map[__func__]++;
}
void btm_sec_rmt_host_support_feat_evt(uint8_t* p) {
void btm_sec_rmt_host_support_feat_evt(const uint8_t* p) {
  mock_function_count_map[__func__]++;
}
void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                       uint8_t* p_bd_name, tHCI_STATUS status) {
                                       const uint8_t* p_bd_name,
                                       tHCI_STATUS status) {
  mock_function_count_map[__func__]++;
}
void btm_sec_set_peer_sec_caps(uint16_t hci_handle, bool ssp_supported,
@@ -297,6 +298,6 @@ void btm_sec_set_peer_sec_caps(uint16_t hci_handle, bool ssp_supported,
void btm_sec_update_clock_offset(uint16_t handle, uint16_t clock_offset) {
  mock_function_count_map[__func__]++;
}
void btm_simple_pair_complete(uint8_t* p) {
void btm_simple_pair_complete(const uint8_t* p) {
  mock_function_count_map[__func__]++;
}