diff options
author | Prem Kumar <premk@google.com> | 2015-01-30 01:15:53 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-30 01:15:53 +0000 |
commit | d78846532fd66d05aa632b55264655b6481c8ac8 (patch) | |
tree | bbbc0a09479fe293aadd9aba3bc839de1300b0b2 | |
parent | 527a9db58da0f7f43d835b24ceabb8e46010d248 (diff) | |
parent | 17d854067162e27c2bf67fd61454ae7b76b79cea (diff) | |
download | bluedroid-d78846532fd66d05aa632b55264655b6481c8ac8.tar.gz |
am 17d85406: Merge "bta_dm_search_cancel sends dm_search state machine complete events" into lmp-mr1-dev
* commit '17d854067162e27c2bf67fd61454ae7b76b79cea':
bta_dm_search_cancel sends dm_search state machine complete events
-rw-r--r-- | bta/dm/bta_dm_act.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c index 4b893ea..7213866 100644 --- a/bta/dm/bta_dm_act.c +++ b/bta/dm/bta_dm_act.c @@ -1276,14 +1276,29 @@ void bta_dm_search_cancel (tBTA_DM_MSG *p_data) p_msg->hdr.event = BTA_DM_SEARCH_CMPL_EVT; p_msg->hdr.layer_specific = BTA_DM_API_DISCOVER_EVT; bta_sys_sendmsg(p_msg); - } } /* If no Service Search going on then issue cancel remote name in case it is active */ else if (!bta_dm_search_cb.name_discover_done) { BTM_CancelRemoteDeviceName(); + + if ((p_msg = (tBTA_DM_MSG *) GKI_getbuf(sizeof(tBTA_DM_MSG))) != NULL) + { + p_msg->hdr.event = BTA_DM_REMT_NAME_EVT; + p_msg->hdr.layer_specific = BTA_DM_API_DISCOVER_EVT; + bta_sys_sendmsg(p_msg); + } } + else { + if ((p_msg = (tBTA_DM_MSG *) GKI_getbuf(sizeof(tBTA_DM_MSG))) != NULL) + { + p_msg->hdr.event = BTA_DM_INQUIRY_CMPL_EVT; + p_msg->hdr.layer_specific = BTA_DM_API_DISCOVER_EVT; + bta_sys_sendmsg(p_msg); + } + } + #if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE if (bta_dm_search_cb.gatt_disc_active) { |