From: Chris Manton Date: Sat, 12 Dec 2020 17:28:05 +0000 (-0800) Subject: Use proper acl transport check X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=533daed2da8dbb59f5278761a5483555e54a0dc8;p=android-x86%2Fsystem-bt.git Use proper acl transport check Towards encapsulation Bug: 163134718 Tag: #refactor Test: gd/cert/run --host Change-Id: I32c2f381dd49c9683217d2c40abe5146b4bd9ad8 --- diff --git a/stack/acl/btm_acl.cc b/stack/acl/btm_acl.cc index 729d7598b..f96541252 100644 --- a/stack/acl/btm_acl.cc +++ b/stack/acl/btm_acl.cc @@ -1516,15 +1516,15 @@ void btm_set_packet_types_from_address(const RawAddress& bd_addr, LOG_WARN("Unable to set packet types on le transport"); return; } - if (btm_pm_is_le_link(bd_addr)) { - LOG_DEBUG("Unable to set packet types on provided le acl"); - return; - } tACL_CONN* p_acl_cb = internal_.btm_bda_to_acl(bd_addr, transport); if (p_acl_cb == nullptr) { LOG_WARN("Unable to find active acl"); return; } + if (p_acl_cb->is_transport_ble()) { + LOG_DEBUG("Unable to set packet types on provided le acl"); + return; + } tBTM_STATUS status = internal_.btm_set_packet_types(p_acl_cb, pkt_types); if (status != BTM_CMD_STARTED) { LOG_ERROR("Unable to set packet types from address");