OSDN Git Service

shim: Remove le from shadow accept list after connection
authorChris Manton <cmanton@google.com>
Sun, 2 May 2021 20:10:51 +0000 (13:10 -0700)
committerChris Manton <cmanton@google.com>
Tue, 4 May 2021 01:15:58 +0000 (18:15 -0700)
Bug: 183374320
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I512714dbca70afd8fb169de6a6f161974a46c802

main/shim/acl.cc

index 3fc7e20..66a1acd 100644 (file)
@@ -1287,6 +1287,10 @@ void shim::legacy::Acl::OnLeConnectSuccess(
   RawAddress peer_rpa = RawAddress::kEmpty;  /* TODO enhanced */
   uint8_t peer_addr_type = 0;                /* TODO public */
 
+  // Once an le connection has successfully been established
+  // the device address is removed from the controller accept list.
+  pimpl_->shadow_acceptlist_.Remove(address_with_type);
+
   TRY_POSTING_ON_MAIN(
       acl_interface_.connection.le.on_connected, legacy_address_with_type,
       handle, ToLegacyRole(connection_role), conn_interval, conn_latency,