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

Commit 084810b4 authored by Martin Brabham's avatar Martin Brabham
Browse files

GD ACL: 'clear_connect_list' to 'clear_filter_accept_list'

Bug: 229047843
Test: mma -j $(nproc)
Test: ./build.py
Test: gd/cert/run
Tag: #compatibility
Change-Id: Ida86098b8f2d23be0a17cdca2a3a9d2640df425a
parent 9e53ea49
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -219,7 +219,7 @@ void AclManager::RemoveDeviceFromFilterAcceptList(AddressWithType address_with_t
}
}


void AclManager::ClearFilterAcceptList() {
void AclManager::ClearFilterAcceptList() {
  CallOn(pimpl_->le_impl_, &le_impl::clear_connect_list);
  CallOn(pimpl_->le_impl_, &le_impl::clear_filter_accept_list);
}
}


void AclManager::AddDeviceToResolvingList(
void AclManager::AddDeviceToResolvingList(
+1 −1
Original line number Original line Diff line number Diff line
@@ -578,7 +578,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
        address_with_type.ToFilterAcceptListAddressType(), address_with_type.GetAddress());
        address_with_type.ToFilterAcceptListAddressType(), address_with_type.GetAddress());
  }
  }


  void clear_connect_list() {
  void clear_filter_accept_list() {
    connect_list.clear();
    connect_list.clear();
    register_with_address_manager();
    register_with_address_manager();
    le_address_manager_->ClearFilterAcceptList();
    le_address_manager_->ClearFilterAcceptList();
+6 −6
Original line number Original line Diff line number Diff line
@@ -192,9 +192,9 @@ void log_link_layer_connection_command(std::unique_ptr<CommandView>& command_vie
      break;
      break;
    }
    }
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
      auto le_clear_connect_list_view = LeClearFilterAcceptListView::Create(
      auto le_clear_filter_accept_list_view = LeClearFilterAcceptListView::Create(
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
      ASSERT(le_clear_connect_list_view.IsValid());
      ASSERT(le_clear_filter_accept_list_view.IsValid());
      direction = android::bluetooth::DIRECTION_INCOMING;
      direction = android::bluetooth::DIRECTION_INCOMING;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      break;
      break;
@@ -372,9 +372,9 @@ void log_link_layer_connection_command_status(std::unique_ptr<CommandView>& comm
      break;
      break;
    }
    }
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
      auto le_clear_connect_list_view = LeClearFilterAcceptListView::Create(
      auto le_clear_filter_accept_list_view = LeClearFilterAcceptListView::Create(
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
      ASSERT(le_clear_connect_list_view.IsValid());
      ASSERT(le_clear_filter_accept_list_view.IsValid());
      direction = android::bluetooth::DIRECTION_INCOMING;
      direction = android::bluetooth::DIRECTION_INCOMING;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      break;
      break;
@@ -434,9 +434,9 @@ void log_link_layer_connection_command_complete(EventView event_view, std::uniqu


  switch (op_code) {
  switch (op_code) {
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
    case OpCode::LE_CLEAR_FILTER_ACCEPT_LIST: {
      auto le_clear_connect_list_view = LeClearFilterAcceptListView::Create(
      auto le_clear_filter_accept_list_view = LeClearFilterAcceptListView::Create(
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
          LeConnectionManagementCommandView::Create(std::move(connection_management_command_view)));
      ASSERT(le_clear_connect_list_view.IsValid());
      ASSERT(le_clear_filter_accept_list_view.IsValid());
      direction = android::bluetooth::DIRECTION_INCOMING;
      direction = android::bluetooth::DIRECTION_INCOMING;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      link_type = android::bluetooth::LINK_TYPE_ACL;
      break;
      break;
+1 −1
Original line number Original line Diff line number Diff line
@@ -362,7 +362,7 @@ TEST_F(LeAddressManagerWithSingleClientTest, remove_device_from_connect_list) {
  clients[0].get()->WaitForResume();
  clients[0].get()->WaitForResume();
}
}


TEST_F(LeAddressManagerWithSingleClientTest, clear_connect_list) {
TEST_F(LeAddressManagerWithSingleClientTest, clear_filter_accept_list) {
  Address address;
  Address address;
  Address::FromString("01:02:03:04:05:06", address);
  Address::FromString("01:02:03:04:05:06", address);
  test_hci_layer_->SetCommandFuture();
  test_hci_layer_->SetCommandFuture();