Loading system/gd/hci/acl_manager/le_acl_connection.h +6 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,12 @@ class LeAclConnection : public AclConnection { // Time Range: 100 ms to 32 s uint16_t supervision_timeout_; // True if connection address was in the filter accept list, false otherwise bool in_filter_accept_list_; bool IsInFilterAcceptList() const { return in_filter_accept_list_; } Address local_resolvable_private_address_ = Address::kEmpty; Address peer_resolvable_private_address_ = Address::kEmpty; Loading system/gd/hci/acl_manager/le_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { arm_on_resume_ = false; ready_to_unregister = true; const bool in_filter_accept_list = is_device_in_connect_list(remote_address); remove_device_from_connect_list(remote_address); if (!connect_list.empty()) { Loading Loading @@ -345,6 +346,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { connection->interval_ = conn_interval; connection->latency_ = conn_latency; connection->supervision_timeout_ = supervision_timeout; connection->in_filter_accept_list_ = in_filter_accept_list; connections.add( handle, remote_address, queue_down_end, handler_, connection->GetEventCallbacks([this](uint16_t handle) { this->connections.invalidate(handle); Loading Loading @@ -393,6 +395,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { arm_on_resume_ = false; ready_to_unregister = true; const bool in_filter_accept_list = is_device_in_connect_list(remote_address); remove_device_from_connect_list(remote_address); if (!connect_list.empty()) { Loading Loading @@ -440,6 +443,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { connection->supervision_timeout_ = supervision_timeout; connection->local_resolvable_private_address_ = connection_complete.GetLocalResolvablePrivateAddress(); connection->peer_resolvable_private_address_ = connection_complete.GetPeerResolvablePrivateAddress(); connection->in_filter_accept_list_ = in_filter_accept_list; connections.add( handle, remote_address, queue_down_end, handler_, connection->GetEventCallbacks([this](uint16_t handle) { this->connections.invalidate(handle); Loading system/main/shim/acl.cc +20 −6 Original line number Diff line number Diff line Loading @@ -779,6 +779,10 @@ class LeShimAclConnection return connection_->locally_initiated_; } bool IsInFilterAcceptList() const { return connection_->IsInFilterAcceptList(); } private: OnDisconnect on_disconnect_; const shim::legacy::acl_le_link_interface_t interface_; Loading Loading @@ -1522,12 +1526,6 @@ void shim::legacy::Acl::OnLeConnectSuccess( std::chrono::system_clock::now())); pimpl_->handle_to_le_connection_map_[handle]->RegisterCallbacks(); pimpl_->handle_to_le_connection_map_[handle] ->ReadRemoteControllerInformation(); tBLE_BD_ADDR legacy_address_with_type = ToLegacyAddressWithType(address_with_type); // Once an le connection has successfully been established // the device address is removed from the controller accept list. Loading @@ -1542,6 +1540,22 @@ void shim::legacy::Acl::OnLeConnectSuccess( pimpl_->shadow_acceptlist_.Remove(address_with_type); } if (!pimpl_->handle_to_le_connection_map_[handle]->IsInFilterAcceptList() && connection_role == hci::Role::CENTRAL) { pimpl_->handle_to_le_connection_map_[handle]->InitiateDisconnect( hci::DisconnectReason::REMOTE_USER_TERMINATED_CONNECTION); LOG_INFO("Disconnected ACL after connection canceled"); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection canceled", "Le"); return; } pimpl_->handle_to_le_connection_map_[handle] ->ReadRemoteControllerInformation(); tBLE_BD_ADDR legacy_address_with_type = ToLegacyAddressWithType(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, Loading Loading
system/gd/hci/acl_manager/le_acl_connection.h +6 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,12 @@ class LeAclConnection : public AclConnection { // Time Range: 100 ms to 32 s uint16_t supervision_timeout_; // True if connection address was in the filter accept list, false otherwise bool in_filter_accept_list_; bool IsInFilterAcceptList() const { return in_filter_accept_list_; } Address local_resolvable_private_address_ = Address::kEmpty; Address peer_resolvable_private_address_ = Address::kEmpty; Loading
system/gd/hci/acl_manager/le_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { arm_on_resume_ = false; ready_to_unregister = true; const bool in_filter_accept_list = is_device_in_connect_list(remote_address); remove_device_from_connect_list(remote_address); if (!connect_list.empty()) { Loading Loading @@ -345,6 +346,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { connection->interval_ = conn_interval; connection->latency_ = conn_latency; connection->supervision_timeout_ = supervision_timeout; connection->in_filter_accept_list_ = in_filter_accept_list; connections.add( handle, remote_address, queue_down_end, handler_, connection->GetEventCallbacks([this](uint16_t handle) { this->connections.invalidate(handle); Loading Loading @@ -393,6 +395,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { arm_on_resume_ = false; ready_to_unregister = true; const bool in_filter_accept_list = is_device_in_connect_list(remote_address); remove_device_from_connect_list(remote_address); if (!connect_list.empty()) { Loading Loading @@ -440,6 +443,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { connection->supervision_timeout_ = supervision_timeout; connection->local_resolvable_private_address_ = connection_complete.GetLocalResolvablePrivateAddress(); connection->peer_resolvable_private_address_ = connection_complete.GetPeerResolvablePrivateAddress(); connection->in_filter_accept_list_ = in_filter_accept_list; connections.add( handle, remote_address, queue_down_end, handler_, connection->GetEventCallbacks([this](uint16_t handle) { this->connections.invalidate(handle); Loading
system/main/shim/acl.cc +20 −6 Original line number Diff line number Diff line Loading @@ -779,6 +779,10 @@ class LeShimAclConnection return connection_->locally_initiated_; } bool IsInFilterAcceptList() const { return connection_->IsInFilterAcceptList(); } private: OnDisconnect on_disconnect_; const shim::legacy::acl_le_link_interface_t interface_; Loading Loading @@ -1522,12 +1526,6 @@ void shim::legacy::Acl::OnLeConnectSuccess( std::chrono::system_clock::now())); pimpl_->handle_to_le_connection_map_[handle]->RegisterCallbacks(); pimpl_->handle_to_le_connection_map_[handle] ->ReadRemoteControllerInformation(); tBLE_BD_ADDR legacy_address_with_type = ToLegacyAddressWithType(address_with_type); // Once an le connection has successfully been established // the device address is removed from the controller accept list. Loading @@ -1542,6 +1540,22 @@ void shim::legacy::Acl::OnLeConnectSuccess( pimpl_->shadow_acceptlist_.Remove(address_with_type); } if (!pimpl_->handle_to_le_connection_map_[handle]->IsInFilterAcceptList() && connection_role == hci::Role::CENTRAL) { pimpl_->handle_to_le_connection_map_[handle]->InitiateDisconnect( hci::DisconnectReason::REMOTE_USER_TERMINATED_CONNECTION); LOG_INFO("Disconnected ACL after connection canceled"); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection canceled", "Le"); return; } pimpl_->handle_to_le_connection_map_[handle] ->ReadRemoteControllerInformation(); tBLE_BD_ADDR legacy_address_with_type = ToLegacyAddressWithType(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, Loading