From 20ee3de14a4ee1b0b12b93a9ceb6f0c096827da0 Mon Sep 17 00:00:00 2001 From: Ravi Nagarajan Date: Fri, 30 Mar 2012 17:00:07 +0530 Subject: Before disconnecting, take the link out of sniff and set the L2C idle timer to 0. Some carkits are re-connecting back, if ACL is not dropped within a short time. Change-Id: Ib4f089a4b426db9a81aff00983645ce430164b75 --- bta/ag/bta_ag_act.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bta') diff --git a/bta/ag/bta_ag_act.c b/bta/ag/bta_ag_act.c index af7c371..de59aa5 100644 --- a/bta/ag/bta_ag_act.c +++ b/bta/ag/bta_ag_act.c @@ -18,6 +18,8 @@ #include "port_api.h" #include "utl.h" #include +#include "bta_dm_int.h" +#include "l2c_api.h" /***************************************************************************** ** Constants @@ -663,6 +665,10 @@ void bta_ag_rfc_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) *******************************************************************************/ void bta_ag_start_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) { + /* Take the link out of sniff and set L2C idle time to 0 */ + bta_dm_pm_active(p_scb->peer_addr); + L2CA_SetIdleTimeoutByBdAddr(p_scb->peer_addr, 0); + /* if SCO is open close SCO and wait on RFCOMM close */ if (bta_ag_sco_is_open(p_scb)) { -- cgit v1.1