OSDN Git Service

Use proper acl transport check
authorChris Manton <cmanton@google.com>
Sat, 12 Dec 2020 17:28:05 +0000 (09:28 -0800)
committerChris Manton <cmanton@google.com>
Sun, 20 Dec 2020 03:31:59 +0000 (19:31 -0800)
Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I32c2f381dd49c9683217d2c40abe5146b4bd9ad8

stack/acl/btm_acl.cc

index 729d759..f965412 100644 (file)
@@ -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");