OSDN Git Service

Remove role adjustment logic from Conn busy/idle handler
authorGanesh Ganapathi Batta <ganeshg@broadcom.com>
Fri, 12 Apr 2013 18:57:50 +0000 (11:57 -0700)
committerMatthew Xie <mattx@google.com>
Tue, 7 May 2013 21:41:56 +0000 (14:41 -0700)
Each call into connection busy/idle handler should not result in
Role adjustments except for AV profiles.
Bug:8322094

Change-Id: I1eba2c428e877772614052396315c6f0467d3378

bta/dm/bta_dm_act.c

index eaac99e..2d0cf91 100644 (file)
@@ -3661,7 +3661,11 @@ static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
         }
         APPL_TRACE_WARNING2("bta_dm_rm_cback:%d, status:%d", bta_dm_cb.cur_av_count, status);
     }
-
+    else if ((status == BTA_SYS_CONN_BUSY) || (status == BTA_SYS_CONN_IDLE))
+    {
+        /* Do not do role switch management for non-AV profiles when data flow starts/stops */
+        return;
+    }
 
     bta_dm_adjust_roles(FALSE);