From: stack/btm/btm_ble_gap::btm_ble_refresh_raddr_timer_timeout
Group functionality within same file
Towards readable code
Bug:
163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ida81c42548b377ecada80bfe7e94f0e4fa45721a
return address;
}
+static void btm_ble_refresh_raddr_timer_timeout(UNUSED_ATTR void* data) {
+ if (btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type == BLE_ADDR_RANDOM) {
+ /* refresh the random addr */
+ btm_gen_resolvable_private_addr(base::Bind(&btm_gen_resolve_paddr_low));
+ }
+}
+
/** This function is called when random address for local controller was
* generated */
void btm_gen_resolve_paddr_low(const RawAddress& address) {
btm_ble_stop_observe();
}
-void btm_ble_refresh_raddr_timer_timeout(UNUSED_ATTR void* data) {
- if (btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type == BLE_ADDR_RANDOM) {
- /* refresh the random addr */
- btm_gen_resolvable_private_addr(base::Bind(&btm_gen_resolve_paddr_low));
- }
-}
-
/*******************************************************************************
*
* Function btm_ble_read_remote_features_complete
#include "hcidefs.h"
#include "smp_api.h"
-extern void btm_ble_refresh_raddr_timer_timeout(void* data);
extern void btm_ble_process_periodic_adv_sync_est_evt(uint8_t len, uint8_t* p);
extern void btm_ble_process_periodic_adv_pkt(uint8_t len, uint8_t* p);
extern void btm_ble_process_periodic_adv_sync_lost_evt(uint8_t len, uint8_t* p);