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

Commit 533478a3 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [30/63] Remove BTM_IsAclConnectionUpAndHandleValid

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: I8c2e5eae07f9f6a3e50de453c470edd5aa4f5ac4
parent 48f6caea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ struct btm_client_interface_t btm_client_interface = {
                        .BTM_GetPeerSCA = ::BTM_GetPeerSCA,
                        .BTM_IsPhy2mSupported = ::BTM_IsPhy2mSupported,
                        .BTM_GetHCIConnHandle = ::BTM_GetHCIConnHandle,
                        .BTM_IsAclConnectionUpAndHandleValid =
                                ::BTM_IsAclConnectionUpAndHandleValid,
                },

        .link_policy =
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ struct btm_client_interface_t {
                                               tBT_TRANSPORT transport);
    [[nodiscard]] uint16_t (*BTM_GetHCIConnHandle)(const RawAddress& bd_addr,
                                                   tBT_TRANSPORT transport);
    [[nodiscard]] bool (*BTM_IsAclConnectionUpAndHandleValid)(const RawAddress& remote_bda,
                                                              tBT_TRANSPORT transport);
  } peer;

  struct {
+0 −5
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ namespace stack_acl {
// Function state capture and return values, if needed
struct BTM_BLE_IS_RESOLVE_BDA BTM_BLE_IS_RESOLVE_BDA;
struct BTM_IsAclConnectionUp BTM_IsAclConnectionUp;
struct BTM_IsAclConnectionUpAndHandleValid BTM_IsAclConnectionUpAndHandleValid;
struct BTM_IsBleConnection BTM_IsBleConnection;
struct BTM_IsPhy2mSupported BTM_IsPhy2mSupported;
struct BTM_ReadRemoteConnectionAddr BTM_ReadRemoteConnectionAddr;
@@ -149,10 +148,6 @@ bool BTM_IsAclConnectionUp(const RawAddress& remote_bda, tBT_TRANSPORT transport
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsAclConnectionUp(remote_bda, transport);
}
bool BTM_IsAclConnectionUpAndHandleValid(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsAclConnectionUpAndHandleValid(remote_bda, transport);
}
bool BTM_IsBleConnection(uint16_t hci_handle) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsBleConnection(hci_handle);
+0 −11
Original line number Diff line number Diff line
@@ -57,17 +57,6 @@ struct BTM_IsAclConnectionUp {
  }
};
extern struct BTM_IsAclConnectionUp BTM_IsAclConnectionUp;
// Name: BTM_IsAclConnectionUpAndHandleValid
// Params: const RawAddress& remote_bda, tBT_TRANSPORT transport
// Returns: bool
struct BTM_IsAclConnectionUpAndHandleValid {
  std::function<bool(const RawAddress& remote_bda, tBT_TRANSPORT transport)> body{
          [](const RawAddress& /* remote_bda */, tBT_TRANSPORT /* transport */) { return false; }};
  bool operator()(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
    return body(remote_bda, transport);
  }
};
extern struct BTM_IsAclConnectionUpAndHandleValid BTM_IsAclConnectionUpAndHandleValid;
// Name: BTM_IsBleConnection
// Params: uint16_t hci_handle
// Returns: bool