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

Commit 60642504 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge changes I588ea202,I7b487104,Ibf33fb45,Ib57d0294,Ica9a7fb0 into main

* changes:
  mock: [35/63] Remove BTM_PmRegister
  mock: [34/63] Remove BTM_IsScoActiveByBdaddr
  mock: [33/63] Remove BTM_IsRemoteVersionReceived
  mock: [32/63] Remove BTM_IsPhy2mSupported
  mock: [31/63] Remove BTM_IsDeviceUp
parents adef9979 c2cedcfd
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ namespace {
class FakeBtStack {
public:
  FakeBtStack() {
    test::mock::stack_btm_devctl::BTM_IsDeviceUp.body = []() { return true; };
    test::mock::stack_acl::acl_create_le_connection.body = [](const RawAddress& bd_addr) {
      return true;
    };
@@ -129,7 +128,6 @@ public:
  }

  ~FakeBtStack() {
    test::mock::stack_btm_devctl::BTM_IsDeviceUp = {};
    test::mock::stack_acl::acl_create_le_connection = {};
    test::mock::stack_acl::acl_send_data_packet_br_edr = {};
    test::mock::stack_acl::acl_send_data_packet_ble = {};
+1 −1
Original line number Diff line number Diff line
@@ -2101,7 +2101,7 @@ void l2cu_create_conn_br_edr(tL2C_LCB* p_lcb) {
    if (!p_lcb_cur->in_use) {
      continue;
    }
    if (BTM_IsScoActiveByBdaddr(p_lcb_cur->remote_bd_addr)) {
    if (get_btm_client_interface().sco.BTM_IsScoActiveByBdaddr(p_lcb_cur->remote_bd_addr)) {
      log::verbose("Central peripheral switch not allowed when SCO active");
      continue;
    }
+0 −10
Original line number Diff line number Diff line
@@ -43,9 +43,7 @@ namespace stack_acl {
struct BTM_BLE_IS_RESOLVE_BDA BTM_BLE_IS_RESOLVE_BDA;
struct BTM_IsAclConnectionUp BTM_IsAclConnectionUp;
struct BTM_IsBleConnection BTM_IsBleConnection;
struct BTM_IsPhy2mSupported BTM_IsPhy2mSupported;
struct BTM_ReadRemoteConnectionAddr BTM_ReadRemoteConnectionAddr;
struct BTM_IsRemoteVersionReceived BTM_IsRemoteVersionReceived;
struct BTM_ReadRemoteVersion BTM_ReadRemoteVersion;
struct BTM_is_sniff_allowed_for BTM_is_sniff_allowed_for;
struct acl_create_le_connection acl_create_le_connection;
@@ -149,20 +147,12 @@ bool BTM_IsBleConnection(uint16_t hci_handle) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsBleConnection(hci_handle);
}
bool BTM_IsPhy2mSupported(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsPhy2mSupported(remote_bda, transport);
}
bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr, RawAddress& conn_addr,
                                  tBLE_ADDR_TYPE* p_addr_type, bool ota_address) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_ReadRemoteConnectionAddr(pseudo_addr, conn_addr, p_addr_type,
                                                             ota_address);
}
bool BTM_IsRemoteVersionReceived(const RawAddress& addr) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::BTM_IsRemoteVersionReceived(addr);
}
bool BTM_ReadRemoteVersion(const RawAddress& addr, uint8_t* lmp_version, uint16_t* manufacturer,
                           uint16_t* lmp_sub_version) {
  inc_func_call_count(__func__);
+0 −20
Original line number Diff line number Diff line
@@ -65,17 +65,6 @@ struct BTM_IsBleConnection {
  bool operator()(uint16_t hci_handle) { return body(hci_handle); }
};
extern struct BTM_IsBleConnection BTM_IsBleConnection;
// Name: BTM_IsPhy2mSupported
// Params: const RawAddress& remote_bda, tBT_TRANSPORT transport
// Returns: bool
struct BTM_IsPhy2mSupported {
  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_IsPhy2mSupported BTM_IsPhy2mSupported;
// Name: BTM_ReadRemoteConnectionAddr
// Params: const RawAddress& pseudo_addr, RawAddress& conn_addr, bool
// ota_address tBLE_ADDR_TYPE* p_addr_type Returns: bool
@@ -90,15 +79,6 @@ struct BTM_ReadRemoteConnectionAddr {
  }
};
extern struct BTM_ReadRemoteConnectionAddr BTM_ReadRemoteConnectionAddr;
// Name: BTM_IsRemoteVersionReceived
// Params: const RawAddress& addr
// Returns: bool
struct BTM_IsRemoteVersionReceived {
  std::function<bool(const RawAddress& addr)> body{
          [](const RawAddress& /* addr */) { return false; }};
  bool operator()(const RawAddress& addr) { return body(addr); }
};
extern struct BTM_IsRemoteVersionReceived BTM_IsRemoteVersionReceived;
// Name: BTM_ReadRemoteVersion
// Params: const RawAddress& addr, uint8_t* lmp_version, uint16_t*
// manufacturer, uint16_t* lmp_sub_version
+0 −5
Original line number Diff line number Diff line
@@ -54,11 +54,6 @@ uint32_t BTM_PM_ReadBleScanDutyCycle(void) {
  inc_func_call_count(__func__);
  return 0;
}
tBTM_STATUS BTM_PmRegister(uint8_t /* mask */, uint8_t* /* p_pm_id */,
                           tBTM_PM_STATUS_CBACK* /* p_cb */) {
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
}
tBTM_STATUS BTM_SetPowerMode(uint8_t /* pm_id */, const RawAddress& /* remote_bda */,
                             const tBTM_PM_PWR_MD* /* p_mode */) {
  inc_func_call_count(__func__);
Loading