summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrem Kumar <premk@google.com>2015-01-30 01:00:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-01-30 01:00:50 +0000
commit17d854067162e27c2bf67fd61454ae7b76b79cea (patch)
tree4a03728029435e4fc12c1f3773d7608dca53fe01
parent893637614568b8ac7dc996c2e9bdbde481fbdc08 (diff)
parentc358eed353e80c388ce0424d8cc89d148390ffb1 (diff)
downloadbluedroid-17d854067162e27c2bf67fd61454ae7b76b79cea.tar.gz
Merge "bta_dm_search_cancel sends dm_search state machine complete events" into lmp-mr1-dev
-rw-r--r--bta/dm/bta_dm_act.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index ed38b7e..0c0c222 100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -1273,14 +1273,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)
{