Loading system/stack/gatt/gatt_main.cc +7 −5 Original line number Diff line number Diff line Loading @@ -332,14 +332,16 @@ void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, // device, skip updating the device state. if (!gatt_update_app_hold_link_status(gatt_if, p_tcb, is_add)) return; if (!check_acl_link || (BTM_GetHCIConnHandle(p_tcb->peer_bda, p_tcb->transport) == GATT_INVALID_ACL_HANDLE)) { if (!check_acl_link) { return; } bool is_valid_handle = (BTM_GetHCIConnHandle(p_tcb->peer_bda, p_tcb->transport) != GATT_INVALID_ACL_HANDLE); if (is_add) { if (p_tcb->att_lcid == L2CAP_ATT_CID) { if (p_tcb->att_lcid == L2CAP_ATT_CID && is_valid_handle) { VLOG(1) << "disable link idle timer"; /* acl link is connected disable the idle timeout */ GATT_SetIdleTimeout(p_tcb->peer_bda, GATT_LINK_NO_IDLE_TIMEOUT, Loading @@ -348,7 +350,7 @@ void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, } else { if (p_tcb->app_hold_link.empty()) { // acl link is connected but no application needs to use the link if (p_tcb->att_lcid == L2CAP_ATT_CID) { if (p_tcb->att_lcid == L2CAP_ATT_CID && is_valid_handle) { /* for fixed channel, set the timeout value to GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP seconds */ VLOG(1) << " start link idle timer = " Loading Loading
system/stack/gatt/gatt_main.cc +7 −5 Original line number Diff line number Diff line Loading @@ -332,14 +332,16 @@ void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, // device, skip updating the device state. if (!gatt_update_app_hold_link_status(gatt_if, p_tcb, is_add)) return; if (!check_acl_link || (BTM_GetHCIConnHandle(p_tcb->peer_bda, p_tcb->transport) == GATT_INVALID_ACL_HANDLE)) { if (!check_acl_link) { return; } bool is_valid_handle = (BTM_GetHCIConnHandle(p_tcb->peer_bda, p_tcb->transport) != GATT_INVALID_ACL_HANDLE); if (is_add) { if (p_tcb->att_lcid == L2CAP_ATT_CID) { if (p_tcb->att_lcid == L2CAP_ATT_CID && is_valid_handle) { VLOG(1) << "disable link idle timer"; /* acl link is connected disable the idle timeout */ GATT_SetIdleTimeout(p_tcb->peer_bda, GATT_LINK_NO_IDLE_TIMEOUT, Loading @@ -348,7 +350,7 @@ void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, } else { if (p_tcb->app_hold_link.empty()) { // acl link is connected but no application needs to use the link if (p_tcb->att_lcid == L2CAP_ATT_CID) { if (p_tcb->att_lcid == L2CAP_ATT_CID && is_valid_handle) { /* for fixed channel, set the timeout value to GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP seconds */ VLOG(1) << " start link idle timer = " Loading