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

Commit 17b7d702 authored by Rahul Arya's avatar Rahul Arya
Browse files

[Connection Manager] Remove unused / redundant methods in le_impl

Test: all existing
Bug: 272572974

Change-Id: I979f06ad29ccd7d2610e69455014f88afc7d20ee
parent 6f640052
Loading
Loading
Loading
Loading
+0 −15
Original line number Original line 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);
  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() {
void AclManager::ClearFilterAcceptList() {
  CallOn(pimpl_->le_impl_, &le_impl::clear_filter_accept_list);
  CallOn(pimpl_->le_impl_, &le_impl::clear_filter_accept_list);
}
}
+0 −3
Original line number Original line Diff line number Diff line
@@ -112,10 +112,7 @@ public:
 virtual void IsOnBackgroundList(AddressWithType address_with_type, std::promise<bool> promise);
 virtual void IsOnBackgroundList(AddressWithType address_with_type, std::promise<bool> promise);


 virtual void CancelLeConnect(AddressWithType address_with_type);
 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 ClearFilterAcceptList();


 virtual void AddDeviceToResolvingList(
 virtual void AddDeviceToResolvingList(
+0 −5
Original line number Original line 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());
    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
  void OnPause() override {  // bluetooth::hci::LeAddressManagerCallback
    if (!address_manager_registered) {
    if (!address_manager_registered) {
      LOG_WARN("Unregistered!");
      LOG_WARN("Unregistered!");
+1 −1
Original line number Original line Diff line number Diff line
@@ -237,7 +237,7 @@ void SecurityManagerImpl::NotifyDeviceUnbonded(hci::AddressWithType device) {
    iter.second->Post(
    iter.second->Post(
        common::Bind(&ISecurityManagerListener::OnDeviceUnbonded, common::Unretained(iter.first), device));
        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) {
void SecurityManagerImpl::NotifyEncryptionStateChanged(hci::EncryptionChangeView encryption_change_view) {
+1 −13
Original line number Original line Diff line number Diff line
@@ -1083,8 +1083,7 @@ struct shim::legacy::Acl::impl {
  void ignore_le_connection_from(
  void ignore_le_connection_from(
      const hci::AddressWithType& address_with_type) {
      const hci::AddressWithType& address_with_type) {
    shadow_acceptlist_.Remove(address_with_type);
    shadow_acceptlist_.Remove(address_with_type);
    GetAclManager()->CancelLeConnectAndRemoveFromBackgroundList(
    GetAclManager()->CancelLeConnect(address_with_type);
        address_with_type);
    LOG_DEBUG("Ignore Le connection from remote:%s",
    LOG_DEBUG("Ignore Le connection from remote:%s",
              ADDRESS_TO_LOGGABLE_CSTR(address_with_type));
              ADDRESS_TO_LOGGABLE_CSTR(address_with_type));
    BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type),
    BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type),
@@ -1133,11 +1132,6 @@ struct shim::legacy::Acl::impl {
    shadow_address_resolution_list_.Clear();
    shadow_address_resolution_list_.Clear();
  }
  }


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

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