summaryrefslogtreecommitdiffstats
path: root/bta/dm
diff options
context:
space:
mode:
Diffstat (limited to 'bta/dm')
-rw-r--r--bta/dm/bta_dm_act.c13
-rw-r--r--bta/dm/bta_dm_cfg.c13
2 files changed, 11 insertions, 15 deletions
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index 91577bf..8260847 100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -454,9 +454,18 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
if(BTM_GetNumAclLinks()==0)
{
- /* Earlier there used to be a 1-second timer to fire this callback.
- * Doesn't look like it is needed. */
+#if (defined(BTA_DISABLE_DELAY) && BTA_DISABLE_DELAY > 0)
+ /* If BTA_DISABLE_DELAY is defined and greater than zero, then delay the shutdown by
+ * BTA_DISABLE_DELAY milliseconds
+ */
+ APPL_TRACE_WARNING2("%s BTA_DISABLE_DELAY set to %d ms",
+ __FUNCTION__, BTA_DISABLE_DELAY);
+ bta_sys_stop_timer(&bta_dm_cb.disable_timer);
+ bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK*)&bta_dm_disable_conn_down_timer_cback;
+ bta_sys_start_timer(&bta_dm_cb.disable_timer, 0, BTA_DISABLE_DELAY);
+#else
bta_dm_disable_conn_down_timer_cback(NULL);
+#endif
}
else
{
diff --git a/bta/dm/bta_dm_cfg.c b/bta/dm/bta_dm_cfg.c
index f09f3bf..5e26909 100644
--- a/bta/dm/bta_dm_cfg.c
+++ b/bta/dm/bta_dm_cfg.c
@@ -28,19 +28,6 @@
#include "bta_api.h"
#include "bta_dm_int.h"
-#ifndef BTA_DM_COD
-
-/*
- * major : COD_MAJOR_PHONE
- * minor : COD_MINOR_SMART_PHONE
- * svc : None, will be set as each profile registers
- *
- */
-
-#define BTA_DM_COD {0x52, BTM_COD_MAJOR_PHONE, BTM_COD_MINOR_SMART_PHONE}
-#endif
-
-
#ifndef BTA_DM_LINK_POLICY_SETTINGS
#define BTA_DM_LINK_POLICY_SETTINGS (HCI_ENABLE_MASTER_SLAVE_SWITCH | HCI_ENABLE_HOLD_MODE | HCI_ENABLE_SNIFF_MODE | HCI_ENABLE_PARK_MODE)
#endif