Loading system/bta/dm/bta_dm_act.cc +3 −5 Original line number Diff line number Diff line Loading @@ -873,11 +873,9 @@ void bta_dm_search_start(tBTA_DM_MSG* p_data) { ******************************************************************************/ void bta_dm_search_cancel() { if (BTM_IsInquiryActive()) { LOG_DEBUG("Cancelling search with inquiry active"); BTM_CancelInquiryNotifyWhenComplete([]() { BTM_CancelInquiry(); bta_dm_search_cancel_notify(); bta_dm_search_cmpl(); }); } /* If no Service Search going on then issue cancel remote name in case it is active */ Loading system/stack/btm/btm_inq.cc +1 −33 Original line number Diff line number Diff line Loading @@ -461,18 +461,6 @@ void BTM_CancelInquiry(void) { } } void BTM_CancelInquiryNotifyWhenComplete( std::function<void()> notify_when_complete_cb) { if (btm_cb.notify_when_complete_cb) { LOG_ERROR( "Please do not overwrite a previous cancel inquiry notification " "callback"); return; } btm_cb.notify_when_complete_cb = notify_when_complete_cb; BTM_CancelInquiry(); } /******************************************************************************* * * Function BTM_StartInquiry Loading Loading @@ -1275,26 +1263,7 @@ void btm_sort_inq_result(void) { * ******************************************************************************/ void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) { if (mode == 0) { LOG_WARN("Inquiry completed but no modes were specified"); return; } // The mode parameters may be a bitmask with only 2 valid bits indicating // completion if (mode & ~(BTM_INQUIRY_ACTIVE_MASK)) { LOG_WARN("Calling with illegal mode:0x%02x", mode); } if (mode == BTM_GENERAL_INQUIRY && btm_cb.notify_when_complete_cb) { LOG_DEBUG( "Cleaning up previous inquiry cancel with proper completion callback " "inq_active:0x%02x inqparms.mode:0x%02x", btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.inqparms.mode); btm_cb.notify_when_complete_cb(); btm_cb.notify_when_complete_cb = {}; return; } tBTM_CMPL_CB* p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb; tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; p_inq->inqparms.mode &= ~(mode); Loading Loading @@ -1328,7 +1297,6 @@ void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) { /* Clear the results callback if set */ p_inq->p_inq_results_cb = NULL; p_inq->inq_active = BTM_INQUIRY_INACTIVE; tBTM_CMPL_CB* p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb; p_inq->p_inq_cmpl_cb = NULL; /* If we have a callback registered for inquiry complete, call it */ Loading system/stack/btm/btm_int_types.h +0 −2 Original line number Diff line number Diff line Loading @@ -309,7 +309,6 @@ typedef struct tBTM_CB { tACL_CB acl_cb_; std::shared_ptr<TimestampedStringCircularBuffer> history_{nullptr}; std::function<void()> notify_when_complete_cb; void Init(uint8_t initial_security_mode) { memset(&cfg, 0, sizeof(cfg)); Loading Loading @@ -354,7 +353,6 @@ typedef struct tBTM_CB { kBtmLogHistoryBufferSize); CHECK(history_ != nullptr); history_->Push(std::string("Initialized btm history")); notify_when_complete_cb = {}; } void Free() { Loading system/stack/include/btm_api.h +0 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ #define BTM_API_H #include <cstdint> #include <functional> #include "device/include/esco_parameters.h" #include "stack/btm/neighbor_inquiry.h" Loading Loading @@ -317,7 +316,6 @@ uint16_t BTM_IsInquiryActive(void); * ******************************************************************************/ void BTM_CancelInquiry(void); void BTM_CancelInquiryNotifyWhenComplete(std::function<void()>); /******************************************************************************* * Loading system/stack/include/btm_client_interface.h +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ struct btm_client_interface_t { // Neighbor struct { void (*BTM_CancelInquiry)(); void (*BTM_CancelInquiryNotifyWhenComplete)(); tBTM_INQ_INFO* (*BTM_InqDbNext)(tBTM_INQ_INFO* p_cur); tBTM_STATUS (*BTM_ClearInqDb)(const RawAddress* p_bda); tBTM_STATUS (*BTM_SetDiscoverability)(uint16_t inq_mode); Loading Loading
system/bta/dm/bta_dm_act.cc +3 −5 Original line number Diff line number Diff line Loading @@ -873,11 +873,9 @@ void bta_dm_search_start(tBTA_DM_MSG* p_data) { ******************************************************************************/ void bta_dm_search_cancel() { if (BTM_IsInquiryActive()) { LOG_DEBUG("Cancelling search with inquiry active"); BTM_CancelInquiryNotifyWhenComplete([]() { BTM_CancelInquiry(); bta_dm_search_cancel_notify(); bta_dm_search_cmpl(); }); } /* If no Service Search going on then issue cancel remote name in case it is active */ Loading
system/stack/btm/btm_inq.cc +1 −33 Original line number Diff line number Diff line Loading @@ -461,18 +461,6 @@ void BTM_CancelInquiry(void) { } } void BTM_CancelInquiryNotifyWhenComplete( std::function<void()> notify_when_complete_cb) { if (btm_cb.notify_when_complete_cb) { LOG_ERROR( "Please do not overwrite a previous cancel inquiry notification " "callback"); return; } btm_cb.notify_when_complete_cb = notify_when_complete_cb; BTM_CancelInquiry(); } /******************************************************************************* * * Function BTM_StartInquiry Loading Loading @@ -1275,26 +1263,7 @@ void btm_sort_inq_result(void) { * ******************************************************************************/ void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) { if (mode == 0) { LOG_WARN("Inquiry completed but no modes were specified"); return; } // The mode parameters may be a bitmask with only 2 valid bits indicating // completion if (mode & ~(BTM_INQUIRY_ACTIVE_MASK)) { LOG_WARN("Calling with illegal mode:0x%02x", mode); } if (mode == BTM_GENERAL_INQUIRY && btm_cb.notify_when_complete_cb) { LOG_DEBUG( "Cleaning up previous inquiry cancel with proper completion callback " "inq_active:0x%02x inqparms.mode:0x%02x", btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.inqparms.mode); btm_cb.notify_when_complete_cb(); btm_cb.notify_when_complete_cb = {}; return; } tBTM_CMPL_CB* p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb; tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; p_inq->inqparms.mode &= ~(mode); Loading Loading @@ -1328,7 +1297,6 @@ void btm_process_inq_complete(tHCI_STATUS status, uint8_t mode) { /* Clear the results callback if set */ p_inq->p_inq_results_cb = NULL; p_inq->inq_active = BTM_INQUIRY_INACTIVE; tBTM_CMPL_CB* p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb; p_inq->p_inq_cmpl_cb = NULL; /* If we have a callback registered for inquiry complete, call it */ Loading
system/stack/btm/btm_int_types.h +0 −2 Original line number Diff line number Diff line Loading @@ -309,7 +309,6 @@ typedef struct tBTM_CB { tACL_CB acl_cb_; std::shared_ptr<TimestampedStringCircularBuffer> history_{nullptr}; std::function<void()> notify_when_complete_cb; void Init(uint8_t initial_security_mode) { memset(&cfg, 0, sizeof(cfg)); Loading Loading @@ -354,7 +353,6 @@ typedef struct tBTM_CB { kBtmLogHistoryBufferSize); CHECK(history_ != nullptr); history_->Push(std::string("Initialized btm history")); notify_when_complete_cb = {}; } void Free() { Loading
system/stack/include/btm_api.h +0 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ #define BTM_API_H #include <cstdint> #include <functional> #include "device/include/esco_parameters.h" #include "stack/btm/neighbor_inquiry.h" Loading Loading @@ -317,7 +316,6 @@ uint16_t BTM_IsInquiryActive(void); * ******************************************************************************/ void BTM_CancelInquiry(void); void BTM_CancelInquiryNotifyWhenComplete(std::function<void()>); /******************************************************************************* * Loading
system/stack/include/btm_client_interface.h +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ struct btm_client_interface_t { // Neighbor struct { void (*BTM_CancelInquiry)(); void (*BTM_CancelInquiryNotifyWhenComplete)(); tBTM_INQ_INFO* (*BTM_InqDbNext)(tBTM_INQ_INFO* p_cur); tBTM_STATUS (*BTM_ClearInqDb)(const RawAddress* p_bda); tBTM_STATUS (*BTM_SetDiscoverability)(uint16_t inq_mode); Loading