From d0cb01480e70b8efff4ba5b230f919807e245339 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Thu, 17 Sep 2020 20:21:42 -0700 Subject: [PATCH] Add Api tBTM_CB::tBTM_BLE_CB::tBTM_BLE_INQ_CB::adv_mode Towards readable code Bug: 163134718 Tag: #refactor Test: acts -tc BleCocTest Test: ble paired 2 phones Change-Id: I522fcfa31f36d487777d6b228cbdacd8b3ef9884 --- stack/btm/btm_ble_int_types.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stack/btm/btm_ble_int_types.h b/stack/btm/btm_ble_int_types.h index 1d9fbf656..fcb1d533a 100644 --- a/stack/btm/btm_ble_int_types.h +++ b/stack/btm/btm_ble_int_types.h @@ -122,7 +122,14 @@ typedef struct { tBLE_ADDR_TYPE adv_addr_type; uint8_t evt_type; + uint8_t adv_mode; + void enable_advertising_mode() { adv_mode = BTM_BLE_ADV_ENABLE; } + void disable_advertising_mode() { adv_mode = BTM_BLE_ADV_DISABLE; } + bool is_advertising_mode_enabled() const { + return (adv_mode == BTM_BLE_ADV_ENABLE); + } + tBLE_BD_ADDR direct_bda; tBTM_BLE_EVT directed_conn; bool fast_adv_on; -- 2.11.0