OSDN Git Service

Set disable timer in case of any active ACL connection
authorSrinu Jella <sjella@codeaurora.org>
Wed, 8 Jun 2016 10:20:53 +0000 (15:50 +0530)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 8 Jun 2016 22:16:50 +0000 (22:16 +0000)
Use Case: Disable time out when atleast one active ACL connections

Steps:
1. Turn ON Bluetooth
2. Connect to any Headset
3. Turn OFF bluetooth.

Failure: Turn OFF bluetooth is failed when atleast one active ACL connections

Root Cause:i If we have one or more active ACL links, so it is not notitying
BTA_DM_DISABLE_EVT to upper layer.

Fix: Set disable timer in case of any active ACL connection

Bug: 29217385

Change-Id: Ica47717119f1ab9fa9f4f5244e8483c408276a2a
(cherry picked from commit 3e4f01ada8c1627bd48f31cd0c8269984b8e5f96)

bta/dm/bta_dm_act.c

index 811a7cd..2fa9d01 100644 (file)
@@ -529,7 +529,7 @@ static void bta_dm_disable_timer_cback(void *data)
 
     APPL_TRACE_EVENT("%s trial %u", __func__, param);
 
-    if ((BTM_GetNumAclLinks() && param) == 0)
+    if (BTM_GetNumAclLinks() && (param == 0))
     {
         for(i=0; i<bta_dm_cb.device_list.count; i++)
         {