mock: Update mock_main_shim_acl

Bug: 324418737
Test: m .
Flag: EXEMPT, Testing infrastructure

Change-Id: I29954559bacfc622c97b71dcedef937ef62cb612
diff --git a/system/test/mock/mock_main_shim_acl.cc b/system/test/mock/mock_main_shim_acl.cc
index 4244b94..0b14802 100644
--- a/system/test/mock/mock_main_shim_acl.cc
+++ b/system/test/mock/mock_main_shim_acl.cc
@@ -14,12 +14,238 @@
  * limitations under the License.
  */
 
-/*
- * Generated mock file from original source file
- *   Functions generated:7
- */
+#include <base/location.h>
+#include <base/strings/stringprintf.h>
 
-#include "main/shim/acl_api.h"
+#include <cstdint>
+#include <future>
+#include <memory>
+#include <optional>
+#include <string>
+
+#include "common/sync_map_count.h"
+#include "device/include/controller.h"
+#include "hci/acl_manager.h"
+#include "hci/acl_manager/classic_acl_connection.h"
+#include "hci/acl_manager/le_acl_connection.h"
+#include "hci/address.h"
+#include "hci/address_with_type.h"
+#include "hci/class_of_device.h"
+#include "main/shim/acl.h"
+#include "main/shim/entry.h"
+#include "os/handler.h"
+#include "stack/acl/acl.h"
 #include "test/common/mock_functions.h"
+#include "types/raw_address.h"
 
-void bluetooth::shim::ACL_Shutdown() { inc_func_call_count(__func__); }
+using namespace bluetooth;
+
+void DumpsysL2cap(int /* fd */) { inc_func_call_count(__func__); }
+
+void DumpsysAcl(int /* fd */) { inc_func_call_count(__func__); }
+
+void DumpsysBtm(int /* fd */) { inc_func_call_count(__func__); }
+
+void DumpsysRecord(int /* fd */) { inc_func_call_count(__func__); }
+
+void DumpsysNeighbor(int /* fd */) { inc_func_call_count(__func__); }
+
+void shim::legacy::Acl::Dump(int /* fd */) const {
+  inc_func_call_count(__func__);
+}
+
+shim::legacy::Acl::Acl(os::Handler* /* handler */,
+                       const acl_interface_t& acl_interface,
+                       uint8_t /* max_acceptlist_size */,
+                       uint8_t /* max_address_resolution_size */)
+    : acl_interface_(acl_interface) {
+  inc_func_call_count(__func__);
+}
+shim::legacy::Acl::~Acl() { inc_func_call_count(__func__); }
+
+bool shim::legacy::Acl::CheckForOrphanedAclConnections() const {
+  inc_func_call_count(__func__);
+  return false;
+}
+
+void shim::legacy::Acl::on_incoming_acl_credits(uint16_t /* handle */,
+                                                uint16_t /* credits */) {
+  inc_func_call_count(__func__);
+}
+
+using HciHandle = uint16_t;
+
+struct shim::legacy::Acl::impl {};
+
+void shim::legacy::Acl::CreateClassicConnection(
+    const hci::Address& /* address */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::CancelClassicConnection(
+    const hci::Address& /* address */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::AcceptLeConnectionFrom(
+    const hci::AddressWithType& /* address_with_type */, bool /* is_direct */,
+    std::promise<bool> /* promise */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::IgnoreLeConnectionFrom(
+    const hci::AddressWithType& /* address_with_type */) {
+  inc_func_call_count(__func__);
+}
+
+void bluetooth::shim::legacy::Acl::OnClassicLinkDisconnected(
+    HciHandle /* handle */, hci::ErrorCode /* reason */) {
+  inc_func_call_count(__func__);
+}
+
+bluetooth::hci::AddressWithType shim::legacy::Acl::GetConnectionLocalAddress(
+    uint16_t /* handle */, bool /* ota_address */) {
+  inc_func_call_count(__func__);
+  return hci::AddressWithType();
+}
+bluetooth::hci::AddressWithType shim::legacy::Acl::GetConnectionPeerAddress(
+    uint16_t /* handle */, bool /* ota_address */) {
+  inc_func_call_count(__func__);
+  return hci::AddressWithType();
+}
+
+std::optional<uint8_t> shim::legacy::Acl::GetAdvertisingSetConnectedTo(
+    const RawAddress& /* remote_bda */) {
+  inc_func_call_count(__func__);
+  return std::nullopt;
+  ;
+}
+
+void shim::legacy::Acl::OnLeLinkDisconnected(HciHandle /* handle */,
+                                             hci::ErrorCode /* reason */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::OnConnectSuccess(
+    std::unique_ptr<hci::acl_manager::ClassicAclConnection> /* connection */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::OnConnectRequest(hci::Address /* address */,
+                                         hci::ClassOfDevice /* cod */) {
+  inc_func_call_count(__func__);
+}
+void shim::legacy::Acl::OnConnectFail(hci::Address /* address */,
+                                      hci::ErrorCode /* reason */,
+                                      bool /* locally_initiated */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::OnLeConnectSuccess(
+    hci::AddressWithType /* address_with_type */,
+    std::unique_ptr<hci::acl_manager::LeAclConnection> /* connection */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::OnLeConnectFail(
+    hci::AddressWithType /* address_with_type */, hci::ErrorCode /* reason */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::DisconnectClassic(uint16_t /* handle */,
+                                          tHCI_STATUS /* reason */,
+                                          std::string /* comment */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::DisconnectLe(uint16_t /* handle */,
+                                     tHCI_STATUS /* reason */,
+                                     std::string /* comment */) {
+  inc_func_call_count(__func__);
+}
+
+bool shim::legacy::Acl::HoldMode(uint16_t /* hci_handle */,
+                                 uint16_t /* max_interval */,
+                                 uint16_t /* min_interval */) {
+  inc_func_call_count(__func__);
+  return false;
+}
+
+bool shim::legacy::Acl::SniffMode(uint16_t /* hci_handle */,
+                                  uint16_t /* max_interval */,
+                                  uint16_t /* min_interval */,
+                                  uint16_t /* attempt */,
+                                  uint16_t /* timeout */) {
+  inc_func_call_count(__func__);
+  return false;
+}
+
+bool shim::legacy::Acl::ExitSniffMode(uint16_t /* hci_handle */) {
+  inc_func_call_count(__func__);
+  return false;
+}
+
+bool shim::legacy::Acl::SniffSubrating(uint16_t /* hci_handle */,
+                                       uint16_t /* maximum_latency */,
+                                       uint16_t /* minimum_remote_timeout */,
+                                       uint16_t /* minimum_local_timeout */) {
+  inc_func_call_count(__func__);
+  return false;
+}
+
+void shim::legacy::Acl::LeSetDefaultSubrate(uint16_t /* subrate_min */,
+                                            uint16_t /* subrate_max */,
+                                            uint16_t /* max_latency */,
+                                            uint16_t /* cont_num */,
+                                            uint16_t /* sup_tout */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::LeSubrateRequest(uint16_t /* hci_handle */,
+                                         uint16_t /* subrate_min */,
+                                         uint16_t /* subrate_max */,
+                                         uint16_t /* max_latency */,
+                                         uint16_t /* cont_num */,
+                                         uint16_t /* sup_tout */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::DumpConnectionHistory(int /* fd */) const {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::DisconnectAllForSuspend() {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::Shutdown() { inc_func_call_count(__func__); }
+
+void shim::legacy::Acl::FinalShutdown() { inc_func_call_count(__func__); }
+
+void shim::legacy::Acl::ClearFilterAcceptList() {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::LeRand(LeRandCallback /* cb */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::AddToAddressResolution(
+    const hci::AddressWithType& /* address_with_type */,
+    const std::array<uint8_t, 16>& /* peer_irk */,
+    const std::array<uint8_t, 16>& /* local_irk */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::RemoveFromAddressResolution(
+    const hci::AddressWithType& /* address_with_type */) {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::ClearAddressResolution() {
+  inc_func_call_count(__func__);
+}
+
+void shim::legacy::Acl::SetSystemSuspendState(bool /* suspended */) {
+  inc_func_call_count(__func__);
+}
diff --git a/system/test/mock/mock_main_shim_acl_api.cc b/system/test/mock/mock_main_shim_acl_api.cc
index ab21692..e679183 100644
--- a/system/test/mock/mock_main_shim_acl_api.cc
+++ b/system/test/mock/mock_main_shim_acl_api.cc
@@ -105,3 +105,5 @@
                                            uint16_t /* sup_tout */) {
   inc_func_call_count(__func__);
 }
+
+void bluetooth::shim::ACL_Shutdown() { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_main_shim_acl_legacy_interface.cc b/system/test/mock/mock_main_shim_acl_legacy_interface.cc
new file mode 100644
index 0000000..a7edba5
--- /dev/null
+++ b/system/test/mock/mock_main_shim_acl_legacy_interface.cc
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "main/shim/acl_legacy_interface.h"
+
+namespace bluetooth {
+namespace shim {
+namespace legacy {
+
+acl_interface_t acl_interface_ = {
+    .on_send_data_upwards = nullptr,
+    .on_packets_completed = nullptr,
+
+    .connection.classic.on_connected = nullptr,
+    .connection.classic.on_connect_request = nullptr,
+    .connection.classic.on_failed = nullptr,
+    .connection.classic.on_disconnected = nullptr,
+
+    .connection.le.on_connected = nullptr,
+    .connection.le.on_failed = nullptr,
+    .connection.le.on_disconnected = nullptr,
+
+    .link.classic.on_authentication_complete = nullptr,
+    .link.classic.on_central_link_key_complete = nullptr,
+    .link.classic.on_change_connection_link_key_complete = nullptr,
+    .link.classic.on_encryption_change = nullptr,
+    .link.classic.on_flow_specification_complete = nullptr,
+    .link.classic.on_flush_occurred = nullptr,
+    .link.classic.on_mode_change = nullptr,
+    .link.classic.on_packet_type_changed = nullptr,
+    .link.classic.on_qos_setup_complete = nullptr,
+    .link.classic.on_read_afh_channel_map_complete = nullptr,
+    .link.classic.on_read_automatic_flush_timeout_complete = nullptr,
+    .link.classic.on_sniff_subrating = nullptr,
+    .link.classic.on_read_clock_complete = nullptr,
+    .link.classic.on_read_clock_offset_complete = nullptr,
+    .link.classic.on_read_failed_contact_counter_complete = nullptr,
+    .link.classic.on_read_link_policy_settings_complete = nullptr,
+    .link.classic.on_read_link_quality_complete = nullptr,
+    .link.classic.on_read_link_supervision_timeout_complete = nullptr,
+    .link.classic.on_read_remote_version_information_complete = nullptr,
+    .link.classic.on_read_remote_supported_features_complete = nullptr,
+    .link.classic.on_read_remote_extended_features_complete = nullptr,
+    .link.classic.on_read_rssi_complete = nullptr,
+    .link.classic.on_read_transmit_power_level_complete = nullptr,
+    .link.classic.on_role_change = nullptr,
+    .link.classic.on_role_discovery_complete = nullptr,
+
+    .link.le.on_connection_update = nullptr,
+    .link.le.on_data_length_change = nullptr,
+    .link.le.on_read_remote_version_information_complete = nullptr,
+    .link.le.on_phy_update = nullptr,
+    .link.le.on_le_subrate_change = nullptr,
+};
+
+const acl_interface_t& GetAclInterface() { return acl_interface_; }
+
+}  // namespace legacy
+}  // namespace shim
+}  // namespace bluetooth