Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9d4b628 authored by Rahul Arya's avatar Rahul Arya Committed by Gerrit Code Review
Browse files

Merge changes I979f06ad,I34143485

* changes:
  [Connection Manager] Remove unused / redundant methods in le_impl
  [Connection Manager] Remove unused flags
parents 3dbf3096 17b7d702
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -307,21 +307,6 @@ void AclManager::RemoveFromBackgroundList(AddressWithType address_with_type) {
  CallOn(pimpl_->le_impl_, &le_impl::remove_device_from_background_connection_list, address_with_type);
}

void AclManager::CancelLeConnectAndRemoveFromBackgroundList(AddressWithType address_with_type) {
  CallOn(
      pimpl_->le_impl_,
      &le_impl::cancel_connection_and_remove_device_from_background_connection_list,
      address_with_type);
}

void AclManager::AddDeviceToFilterAcceptList(AddressWithType address_with_type) {
  CallOn(pimpl_->le_impl_, &le_impl::add_device_to_connect_list, address_with_type);
}

void AclManager::RemoveDeviceFromFilterAcceptList(AddressWithType address_with_type) {
  CallOn(pimpl_->le_impl_, &le_impl::remove_device_from_connect_list, address_with_type);
}

void AclManager::ClearFilterAcceptList() {
  CallOn(pimpl_->le_impl_, &le_impl::clear_filter_accept_list);
}
+0 −3
Original line number Diff line number Diff line
@@ -112,10 +112,7 @@ public:
 virtual void IsOnBackgroundList(AddressWithType address_with_type, std::promise<bool> promise);

 virtual void CancelLeConnect(AddressWithType address_with_type);
 virtual void CancelLeConnectAndRemoveFromBackgroundList(AddressWithType address_with_type);

 virtual void AddDeviceToFilterAcceptList(AddressWithType address_with_type);
 virtual void RemoveDeviceFromFilterAcceptList(AddressWithType address_with_type);
 virtual void ClearFilterAcceptList();

 virtual void AddDeviceToResolvingList(
+0 −5
Original line number Diff line number Diff line
@@ -1240,11 +1240,6 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    promise.set_value(background_connections_.find(address_with_type) != background_connections_.end());
  }

  void cancel_connection_and_remove_device_from_background_connection_list(AddressWithType address_with_type) {
    remove_device_from_background_connection_list(address_with_type);
    cancel_connect(address_with_type);
  }

  void OnPause() override {  // bluetooth::hci::LeAddressManagerCallback
    if (!address_manager_registered) {
      LOG_WARN("Unregistered!");
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ void SecurityManagerImpl::NotifyDeviceUnbonded(hci::AddressWithType device) {
    iter.second->Post(
        common::Bind(&ISecurityManagerListener::OnDeviceUnbonded, common::Unretained(iter.first), device));
  }
  acl_manager_->RemoveDeviceFromFilterAcceptList(device);
  acl_manager_->CancelLeConnect(device);
}

void SecurityManagerImpl::NotifyEncryptionStateChanged(hci::EncryptionChangeView encryption_change_view) {
+1 −13
Original line number Diff line number Diff line
@@ -1083,8 +1083,7 @@ struct shim::legacy::Acl::impl {
  void ignore_le_connection_from(
      const hci::AddressWithType& address_with_type) {
    shadow_acceptlist_.Remove(address_with_type);
    GetAclManager()->CancelLeConnectAndRemoveFromBackgroundList(
        address_with_type);
    GetAclManager()->CancelLeConnect(address_with_type);
    LOG_DEBUG("Ignore Le connection from remote:%s",
              ADDRESS_TO_LOGGABLE_CSTR(address_with_type));
    BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type),
@@ -1133,11 +1132,6 @@ struct shim::legacy::Acl::impl {
    shadow_address_resolution_list_.Clear();
  }

  void AddDeviceToFilterAcceptList(
      const hci::AddressWithType& address_with_type) {
    GetAclManager()->AddDeviceToFilterAcceptList(address_with_type);
  }

  void SetSystemSuspendState(bool suspended) {
    GetAclManager()->SetSystemSuspendState(suspended);
  }
@@ -1892,12 +1886,6 @@ void shim::legacy::Acl::ClearAddressResolution() {
  handler_->CallOn(pimpl_.get(), &Acl::impl::ClearResolvingList);
}

void shim::legacy::Acl::AddDeviceToFilterAcceptList(
    const hci::AddressWithType& address_with_type) {
  handler_->CallOn(pimpl_.get(), &Acl::impl::AddDeviceToFilterAcceptList,
                   address_with_type);
}

void shim::legacy::Acl::SetSystemSuspendState(bool suspended) {
  handler_->CallOn(pimpl_.get(), &Acl::impl::SetSystemSuspendState, suspended);
}
Loading