Loading system/bta/dm/bta_dm_act.cc +0 −8 Original line number Diff line number Diff line Loading @@ -1469,11 +1469,6 @@ void bta_dm_queue_disc(tBTA_DM_MSG* p_data) { ******************************************************************************/ void bta_dm_execute_queued_request() { if (bta_dm_search_cb.p_pending_search) { // Updated queued event to search event to trigger start search if (bta_dm_search_cb.p_pending_search->hdr.event == BTA_DM_API_QUEUE_SEARCH_EVT) { bta_dm_search_cb.p_pending_search->hdr.event = BTA_DM_API_SEARCH_EVT; } LOG_INFO("%s Start pending search", __func__); bta_sys_sendmsg(bta_dm_search_cb.p_pending_search); bta_dm_search_cb.p_pending_search = NULL; Loading @@ -1481,9 +1476,6 @@ void bta_dm_execute_queued_request() { tBTA_DM_MSG* p_pending_discovery = (tBTA_DM_MSG*)fixed_queue_try_dequeue( bta_dm_search_cb.pending_discovery_queue); if (p_pending_discovery) { if (p_pending_discovery->hdr.event == BTA_DM_API_QUEUE_DISCOVER_EVT) { p_pending_discovery->hdr.event = BTA_DM_API_DISCOVER_EVT; } LOG_INFO("%s Start pending discovery", __func__); bta_sys_sendmsg(p_pending_discovery); } Loading system/bta/dm/bta_dm_api.cc +4 −13 Original line number Diff line number Diff line Loading @@ -80,16 +80,11 @@ void BTA_DmSetDeviceName(const char* p_name) { * Returns void * ******************************************************************************/ void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback, bool is_bonding_or_sdp) { void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback) { tBTA_DM_API_SEARCH* p_msg = (tBTA_DM_API_SEARCH*)osi_calloc(sizeof(tBTA_DM_API_SEARCH)); /* Queue request if a device is bonding or performing service discovery */ if (is_bonding_or_sdp) { p_msg->hdr.event = BTA_DM_API_QUEUE_SEARCH_EVT; } else { p_msg->hdr.event = BTA_DM_API_SEARCH_EVT; } p_msg->p_cback = p_cback; bta_sys_sendmsg(p_msg); Loading Loading @@ -138,15 +133,11 @@ void BTA_DmSearchCancel(void) { * ******************************************************************************/ void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback, tBT_TRANSPORT transport, bool is_bonding_or_sdp) { tBT_TRANSPORT transport) { tBTA_DM_API_DISCOVER* p_msg = (tBTA_DM_API_DISCOVER*)osi_calloc(sizeof(tBTA_DM_API_DISCOVER)); if (is_bonding_or_sdp) { p_msg->hdr.event = BTA_DM_API_QUEUE_DISCOVER_EVT; } else { p_msg->hdr.event = BTA_DM_API_DISCOVER_EVT; } p_msg->bd_addr = bd_addr; p_msg->transport = transport; p_msg->p_cback = p_cback; Loading system/bta/dm/bta_dm_int.h +2 −4 Original line number Diff line number Diff line Loading @@ -71,18 +71,16 @@ enum { BTA_DM_SEARCH_CMPL_EVT, BTA_DM_DISCOVERY_RESULT_EVT, BTA_DM_DISC_CLOSE_TOUT_EVT, BTA_DM_API_QUEUE_SEARCH_EVT, BTA_DM_API_QUEUE_DISCOVER_EVT }; /* data type for BTA_DM_API_SEARCH_EVT and BTA_DM_API_QUEUE_SEARCH_EVT */ /* data type for BTA_DM_API_SEARCH_EVT */ typedef struct { BT_HDR_RIGID hdr; tBTA_SERVICE_MASK services; tBTA_DM_SEARCH_CBACK* p_cback; } tBTA_DM_API_SEARCH; /* data type for BTA_DM_API_DISCOVER_EVT and BTA_DM_API_QUEUE_DISCOVER_EVT */ /* data type for BTA_DM_API_DISCOVER_EVT */ typedef struct { BT_HDR_RIGID hdr; RawAddress bd_addr; Loading system/bta/dm/bta_dm_main.cc +0 −11 Original line number Diff line number Diff line Loading @@ -82,12 +82,6 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { case BTA_DM_DISC_CLOSE_TOUT_EVT: bta_dm_close_gatt_conn(message); break; case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } break; case BTA_DM_SEARCH_ACTIVE: Loading @@ -108,7 +102,6 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { bta_dm_close_gatt_conn(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } Loading @@ -116,11 +109,9 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { case BTA_DM_SEARCH_CANCELLING: switch (p_msg->event) { case BTA_DM_API_SEARCH_EVT: case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; case BTA_DM_SDP_RESULT_EVT: Loading Loading @@ -149,11 +140,9 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { bta_dm_disc_result(message); break; case BTA_DM_API_SEARCH_EVT: case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } Loading system/bta/include/bta_api.h +3 −5 Original line number Diff line number Diff line Loading @@ -710,15 +710,13 @@ extern bool BTA_DmSetVisibility(bt_scan_mode_t mode); * first performs an inquiry; for each device found from the * inquiry it gets the remote name of the device. If * parameter services is nonzero, service discovery will be * performed on each device for the services specified. If the * parameter is_bonding_or_sdp is true, the request will be * queued until bonding or sdp completes * performed on each device for the services specified. * * * Returns void * ******************************************************************************/ extern void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback, bool is_bonding_or_sdp); extern void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback); /******************************************************************************* * Loading Loading @@ -746,7 +744,7 @@ extern void BTA_DmSearchCancel(void); ******************************************************************************/ extern void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback, tBT_TRANSPORT transport, bool is_bonding_or_sdp); tBT_TRANSPORT transport); /******************************************************************************* * Loading Loading
system/bta/dm/bta_dm_act.cc +0 −8 Original line number Diff line number Diff line Loading @@ -1469,11 +1469,6 @@ void bta_dm_queue_disc(tBTA_DM_MSG* p_data) { ******************************************************************************/ void bta_dm_execute_queued_request() { if (bta_dm_search_cb.p_pending_search) { // Updated queued event to search event to trigger start search if (bta_dm_search_cb.p_pending_search->hdr.event == BTA_DM_API_QUEUE_SEARCH_EVT) { bta_dm_search_cb.p_pending_search->hdr.event = BTA_DM_API_SEARCH_EVT; } LOG_INFO("%s Start pending search", __func__); bta_sys_sendmsg(bta_dm_search_cb.p_pending_search); bta_dm_search_cb.p_pending_search = NULL; Loading @@ -1481,9 +1476,6 @@ void bta_dm_execute_queued_request() { tBTA_DM_MSG* p_pending_discovery = (tBTA_DM_MSG*)fixed_queue_try_dequeue( bta_dm_search_cb.pending_discovery_queue); if (p_pending_discovery) { if (p_pending_discovery->hdr.event == BTA_DM_API_QUEUE_DISCOVER_EVT) { p_pending_discovery->hdr.event = BTA_DM_API_DISCOVER_EVT; } LOG_INFO("%s Start pending discovery", __func__); bta_sys_sendmsg(p_pending_discovery); } Loading
system/bta/dm/bta_dm_api.cc +4 −13 Original line number Diff line number Diff line Loading @@ -80,16 +80,11 @@ void BTA_DmSetDeviceName(const char* p_name) { * Returns void * ******************************************************************************/ void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback, bool is_bonding_or_sdp) { void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback) { tBTA_DM_API_SEARCH* p_msg = (tBTA_DM_API_SEARCH*)osi_calloc(sizeof(tBTA_DM_API_SEARCH)); /* Queue request if a device is bonding or performing service discovery */ if (is_bonding_or_sdp) { p_msg->hdr.event = BTA_DM_API_QUEUE_SEARCH_EVT; } else { p_msg->hdr.event = BTA_DM_API_SEARCH_EVT; } p_msg->p_cback = p_cback; bta_sys_sendmsg(p_msg); Loading Loading @@ -138,15 +133,11 @@ void BTA_DmSearchCancel(void) { * ******************************************************************************/ void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback, tBT_TRANSPORT transport, bool is_bonding_or_sdp) { tBT_TRANSPORT transport) { tBTA_DM_API_DISCOVER* p_msg = (tBTA_DM_API_DISCOVER*)osi_calloc(sizeof(tBTA_DM_API_DISCOVER)); if (is_bonding_or_sdp) { p_msg->hdr.event = BTA_DM_API_QUEUE_DISCOVER_EVT; } else { p_msg->hdr.event = BTA_DM_API_DISCOVER_EVT; } p_msg->bd_addr = bd_addr; p_msg->transport = transport; p_msg->p_cback = p_cback; Loading
system/bta/dm/bta_dm_int.h +2 −4 Original line number Diff line number Diff line Loading @@ -71,18 +71,16 @@ enum { BTA_DM_SEARCH_CMPL_EVT, BTA_DM_DISCOVERY_RESULT_EVT, BTA_DM_DISC_CLOSE_TOUT_EVT, BTA_DM_API_QUEUE_SEARCH_EVT, BTA_DM_API_QUEUE_DISCOVER_EVT }; /* data type for BTA_DM_API_SEARCH_EVT and BTA_DM_API_QUEUE_SEARCH_EVT */ /* data type for BTA_DM_API_SEARCH_EVT */ typedef struct { BT_HDR_RIGID hdr; tBTA_SERVICE_MASK services; tBTA_DM_SEARCH_CBACK* p_cback; } tBTA_DM_API_SEARCH; /* data type for BTA_DM_API_DISCOVER_EVT and BTA_DM_API_QUEUE_DISCOVER_EVT */ /* data type for BTA_DM_API_DISCOVER_EVT */ typedef struct { BT_HDR_RIGID hdr; RawAddress bd_addr; Loading
system/bta/dm/bta_dm_main.cc +0 −11 Original line number Diff line number Diff line Loading @@ -82,12 +82,6 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { case BTA_DM_DISC_CLOSE_TOUT_EVT: bta_dm_close_gatt_conn(message); break; case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } break; case BTA_DM_SEARCH_ACTIVE: Loading @@ -108,7 +102,6 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { bta_dm_close_gatt_conn(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } Loading @@ -116,11 +109,9 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { case BTA_DM_SEARCH_CANCELLING: switch (p_msg->event) { case BTA_DM_API_SEARCH_EVT: case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; case BTA_DM_SDP_RESULT_EVT: Loading Loading @@ -149,11 +140,9 @@ bool bta_dm_search_sm_execute(BT_HDR_RIGID* p_msg) { bta_dm_disc_result(message); break; case BTA_DM_API_SEARCH_EVT: case BTA_DM_API_QUEUE_SEARCH_EVT: bta_dm_queue_search(message); break; case BTA_DM_API_DISCOVER_EVT: case BTA_DM_API_QUEUE_DISCOVER_EVT: bta_dm_queue_disc(message); break; } Loading
system/bta/include/bta_api.h +3 −5 Original line number Diff line number Diff line Loading @@ -710,15 +710,13 @@ extern bool BTA_DmSetVisibility(bt_scan_mode_t mode); * first performs an inquiry; for each device found from the * inquiry it gets the remote name of the device. If * parameter services is nonzero, service discovery will be * performed on each device for the services specified. If the * parameter is_bonding_or_sdp is true, the request will be * queued until bonding or sdp completes * performed on each device for the services specified. * * * Returns void * ******************************************************************************/ extern void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback, bool is_bonding_or_sdp); extern void BTA_DmSearch(tBTA_DM_SEARCH_CBACK* p_cback); /******************************************************************************* * Loading Loading @@ -746,7 +744,7 @@ extern void BTA_DmSearchCancel(void); ******************************************************************************/ extern void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback, tBT_TRANSPORT transport, bool is_bonding_or_sdp); tBT_TRANSPORT transport); /******************************************************************************* * Loading