From 8e3dbd16f4da35a8f6f249ca686e72639212961e Mon Sep 17 00:00:00 2001 From: Chris Manton <cmanton@google.com> Date: Mon, 1 Nov 2021 17:01:29 -0700 Subject: [PATCH] legacy: Const-ify bta_dm_pin_cback Bug: 187830698 Tag: #refactor Test: gd/cert/run Change-Id: I465878750fac5f03d9b3c9fdd877ebadcba71c5d --- system/bta/dm/bta_dm_act.cc | 4 ++-- system/stack/include/security_client_callbacks.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/bta/dm/bta_dm_act.cc b/system/bta/dm/bta_dm_act.cc index 221ac619b0a..38f1f0ecb57 100644 --- a/system/bta/dm/bta_dm_act.cc +++ b/system/bta/dm/bta_dm_act.cc @@ -78,7 +78,7 @@ static void bta_dm_find_services(const RawAddress& bd_addr); static void bta_dm_discover_next_device(void); static void bta_dm_sdp_callback(tSDP_STATUS sdp_status); static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class, - BD_NAME bd_name, bool min_16_digit); + const BD_NAME bd_name, bool min_16_digit); static uint8_t bta_dm_new_link_key_cback(const RawAddress& bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, const LinkKey& key, uint8_t key_type); @@ -2028,7 +2028,7 @@ static void bta_dm_pinname_cback(void* p_data) { * ******************************************************************************/ static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class, - BD_NAME bd_name, bool min_16_digit) { + const BD_NAME bd_name, bool min_16_digit) { if (!bta_dm_cb.p_sec_cback) return BTM_NOT_AUTHORIZED; /* If the device name is not known, save bdaddr and devclass and initiate a diff --git a/system/stack/include/security_client_callbacks.h b/system/stack/include/security_client_callbacks.h index 4bc68f75d15..de59ff17439 100644 --- a/system/stack/include/security_client_callbacks.h +++ b/system/stack/include/security_client_callbacks.h @@ -40,7 +40,8 @@ typedef uint8_t(tBTM_AUTHORIZE_CALLBACK)(uint8_t service_id); * Flag indicating the minimum pin code length to be 16 digits */ typedef uint8_t(tBTM_PIN_CALLBACK)(const RawAddress& bd_addr, - DEV_CLASS dev_class, tBTM_BD_NAME bd_name, + DEV_CLASS dev_class, + const tBTM_BD_NAME bd_name, bool min_16_digit); /* New Link Key for the connection. Parameters are -- GitLab