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

Commit e9454b4d authored by Chris Manton's avatar Chris Manton
Browse files

Comment out select unused parameters test::mock::bta::

Bug: 327521827
Test: m .
Flag: EXEMPT, Test Infrastructure

Change-Id: I390f7888d2d3288e851e70d46a1519453c27cd22
parent 02a12046
Loading
Loading
Loading
Loading
+92 −70
Original line number Diff line number Diff line
@@ -31,138 +31,160 @@
#include "types/raw_address.h"

void BTA_GATTC_Disable(void) { inc_func_call_count(__func__); }
const gatt::Characteristic* BTA_GATTC_GetCharacteristic(uint16_t conn_id,
                                                        uint16_t handle) {
const gatt::Characteristic* BTA_GATTC_GetCharacteristic(uint16_t /* conn_id */,
                                                        uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return nullptr;
}
const gatt::Characteristic* BTA_GATTC_GetOwningCharacteristic(uint16_t conn_id,
                                                              uint16_t handle) {
const gatt::Characteristic* BTA_GATTC_GetOwningCharacteristic(
    uint16_t /* conn_id */, uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return nullptr;
}
const gatt::Descriptor* BTA_GATTC_GetDescriptor(uint16_t conn_id,
                                                uint16_t handle) {
const gatt::Descriptor* BTA_GATTC_GetDescriptor(uint16_t /* conn_id */,
                                                uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return nullptr;
}
const gatt::Service* BTA_GATTC_GetOwningService(uint16_t conn_id,
                                                uint16_t handle) {
const gatt::Service* BTA_GATTC_GetOwningService(uint16_t /* conn_id */,
                                                uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return nullptr;
}
const std::list<gatt::Service>* BTA_GATTC_GetServices(uint16_t conn_id) {
const std::list<gatt::Service>* BTA_GATTC_GetServices(uint16_t /* conn_id */) {
  inc_func_call_count(__func__);
  return nullptr;
}
tGATT_STATUS BTA_GATTC_DeregisterForNotifications(tGATT_IF client_if,
                                                  const RawAddress& bda,
                                                  uint16_t handle) {
tGATT_STATUS BTA_GATTC_DeregisterForNotifications(tGATT_IF /* client_if */,
                                                  const RawAddress& /* bda */,
                                                  uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return GATT_SUCCESS;
}
tGATT_STATUS BTA_GATTC_RegisterForNotifications(tGATT_IF client_if,
                                                const RawAddress& bda,
                                                uint16_t handle) {
tGATT_STATUS BTA_GATTC_RegisterForNotifications(tGATT_IF /* client_if */,
                                                const RawAddress& /* bda */,
                                                uint16_t /* handle */) {
  inc_func_call_count(__func__);
  return GATT_SUCCESS;
}
void BTA_GATTC_AppDeregister(tGATT_IF client_if) {
void BTA_GATTC_AppDeregister(tGATT_IF /* client_if */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_AppRegister(tBTA_GATTC_CBACK* p_client_cb,
                           BtaAppRegisterCallback cb, bool eatt_support) {
void BTA_GATTC_AppRegister(tBTA_GATTC_CBACK* /* p_client_cb */,
                           BtaAppRegisterCallback /* cb */,
                           bool /* eatt_support */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_CancelOpen(tGATT_IF client_if, const RawAddress& remote_bda,
                          bool is_direct) {
void BTA_GATTC_CancelOpen(tGATT_IF /* client_if */,
                          const RawAddress& /* remote_bda */,
                          bool /* is_direct */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_Close(uint16_t conn_id) { inc_func_call_count(__func__); }
void BTA_GATTC_ConfigureMTU(uint16_t conn_id, uint16_t mtu) {
void BTA_GATTC_Close(uint16_t /* conn_id */) { inc_func_call_count(__func__); }
void BTA_GATTC_ConfigureMTU(uint16_t /* conn_id */, uint16_t /* mtu */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ConfigureMTU(uint16_t conn_id, uint16_t mtu,
                            GATT_CONFIGURE_MTU_OP_CB callback, void* cb_data) {
void BTA_GATTC_ConfigureMTU(uint16_t /* conn_id */, uint16_t /* mtu */,
                            GATT_CONFIGURE_MTU_OP_CB /* callback */,
                            void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_DiscoverServiceByUuid(uint16_t conn_id,
                                     const bluetooth::Uuid& srvc_uuid) {
void BTA_GATTC_DiscoverServiceByUuid(uint16_t /* conn_id */,
                                     const bluetooth::Uuid& /* srvc_uuid */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ExecuteWrite(uint16_t conn_id, bool is_execute) {
void BTA_GATTC_ExecuteWrite(uint16_t /* conn_id */, bool /* is_execute */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_GetGattDb(uint16_t conn_id, uint16_t start_handle,
                         uint16_t end_handle, btgatt_db_element_t** db,
                         int* count) {
void BTA_GATTC_GetGattDb(uint16_t /* conn_id */, uint16_t /* start_handle */,
                         uint16_t /* end_handle */,
                         btgatt_db_element_t** /* db */, int* /* count */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    tBTM_BLE_CONN_TYPE connection_type, bool opportunistic) {
void BTA_GATTC_Open(tGATT_IF /* client_if */,
                    const RawAddress& /* remote_bda */,
                    tBTM_BLE_CONN_TYPE /* connection_type */,
                    bool /* opportunistic */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    tBTM_BLE_CONN_TYPE connection_type, tBT_TRANSPORT transport,
                    bool opportunistic, uint8_t initiating_phys) {
void BTA_GATTC_Open(tGATT_IF /* client_if */,
                    const RawAddress& /* remote_bda */,
                    tBTM_BLE_CONN_TYPE /* connection_type */,
                    tBT_TRANSPORT /* transport */, bool /* opportunistic */,
                    uint8_t /* initiating_phys */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    tBLE_ADDR_TYPE addr_type,
                    tBTM_BLE_CONN_TYPE connection_type, tBT_TRANSPORT transport,
                    bool opportunistic, uint8_t initiating_phys) {
void BTA_GATTC_Open(tGATT_IF /* client_if */,
                    const RawAddress& /* remote_bda */,
                    tBLE_ADDR_TYPE /* addr_type */,
                    tBTM_BLE_CONN_TYPE /* connection_type */,
                    tBT_TRANSPORT /* transport */, bool /* opportunistic */,
                    uint8_t /* initiating_phys */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_PrepareWrite(uint16_t conn_id, uint16_t handle, uint16_t offset,
                            std::vector<uint8_t> value, tGATT_AUTH_REQ auth_req,
                            GATT_WRITE_OP_CB callback, void* cb_data) {
void BTA_GATTC_PrepareWrite(uint16_t /* conn_id */, uint16_t /* handle */,
                            uint16_t /* offset */,
                            std::vector<uint8_t> /* value */,
                            tGATT_AUTH_REQ /* auth_req */,
                            GATT_WRITE_OP_CB /* callback */,
                            void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ReadCharDescr(uint16_t conn_id, uint16_t handle,
                             tGATT_AUTH_REQ auth_req, GATT_READ_OP_CB callback,
                             void* cb_data) {
void BTA_GATTC_ReadCharDescr(uint16_t /* conn_id */, uint16_t /* handle */,
                             tGATT_AUTH_REQ /* auth_req */,
                             GATT_READ_OP_CB /* callback */,
                             void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ReadCharacteristic(uint16_t conn_id, uint16_t handle,
                                  tGATT_AUTH_REQ auth_req,
                                  GATT_READ_OP_CB callback, void* cb_data) {
void BTA_GATTC_ReadCharacteristic(uint16_t /* conn_id */, uint16_t /* handle */,
                                  tGATT_AUTH_REQ /* auth_req */,
                                  GATT_READ_OP_CB /* callback */,
                                  void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ReadMultiple(uint16_t conn_id, tBTA_GATTC_MULTI& handles,
                            bool variable_len, tGATT_AUTH_REQ auth_req,
                            GATT_READ_MULTI_OP_CB callback, void* cb_data) {
void BTA_GATTC_ReadMultiple(uint16_t /* conn_id */,
                            tBTA_GATTC_MULTI& /* handles */,
                            bool /* variable_len */,
                            tGATT_AUTH_REQ /* auth_req */,
                            GATT_READ_MULTI_OP_CB /* callback */,
                            void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ReadUsingCharUuid(uint16_t conn_id, const bluetooth::Uuid& uuid,
                                 uint16_t s_handle, uint16_t e_handle,
                                 tGATT_AUTH_REQ auth_req,
                                 GATT_READ_OP_CB callback, void* cb_data) {
void BTA_GATTC_ReadUsingCharUuid(uint16_t /* conn_id */,
                                 const bluetooth::Uuid& /* uuid */,
                                 uint16_t /* s_handle */,
                                 uint16_t /* e_handle */,
                                 tGATT_AUTH_REQ /* auth_req */,
                                 GATT_READ_OP_CB /* callback */,
                                 void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_Refresh(const RawAddress& remote_bda) {
void BTA_GATTC_Refresh(const RawAddress& /* remote_bda */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_SendIndConfirm(uint16_t conn_id, uint16_t cid) {
void BTA_GATTC_SendIndConfirm(uint16_t /* conn_id */, uint16_t /* cid */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_ServiceSearchRequest(uint16_t conn_id,
                                    const bluetooth::Uuid* p_srvc_uuid) {
void BTA_GATTC_ServiceSearchRequest(uint16_t /* conn_id */,
                                    const bluetooth::Uuid* /* p_srvc_uuid */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_WriteCharDescr(uint16_t conn_id, uint16_t handle,
                              std::vector<uint8_t> value,
                              tGATT_AUTH_REQ auth_req,
                              GATT_WRITE_OP_CB callback, void* cb_data) {
void BTA_GATTC_WriteCharDescr(uint16_t /* conn_id */, uint16_t /* handle */,
                              std::vector<uint8_t> /* value */,
                              tGATT_AUTH_REQ /* auth_req */,
                              GATT_WRITE_OP_CB /* callback */,
                              void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void BTA_GATTC_WriteCharValue(uint16_t conn_id, uint16_t handle,
                              tGATT_WRITE_TYPE write_type,
                              std::vector<uint8_t> value,
                              tGATT_AUTH_REQ auth_req,
                              GATT_WRITE_OP_CB callback, void* cb_data) {
void BTA_GATTC_WriteCharValue(uint16_t /* conn_id */, uint16_t /* handle */,
                              tGATT_WRITE_TYPE /* write_type */,
                              std::vector<uint8_t> /* value */,
                              tGATT_AUTH_REQ /* auth_req */,
                              GATT_WRITE_OP_CB /* callback */,
                              void* /* cb_data */) {
  inc_func_call_count(__func__);
}
void bta_gattc_continue_discovery_if_needed(const RawAddress& bd_addr,
                                            uint16_t acl_handle) {
void bta_gattc_continue_discovery_if_needed(const RawAddress& /* bd_addr */,
                                            uint16_t /* acl_handle */) {
  inc_func_call_count(__func__);
}
+25 −21
Original line number Diff line number Diff line
@@ -33,45 +33,49 @@
#include "types/raw_address.h"

void BTA_GATTS_Disable(void) { inc_func_call_count(__func__); }
void BTA_GATTS_AppDeregister(tGATT_IF server_if) {
void BTA_GATTS_AppDeregister(tGATT_IF /* server_if */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_AppRegister(const bluetooth::Uuid& app_uuid,
                           tBTA_GATTS_CBACK* p_cback, bool eatt_support) {
void BTA_GATTS_AppRegister(const bluetooth::Uuid& /* app_uuid */,
                           tBTA_GATTS_CBACK* /* p_cback */,
                           bool /* eatt_support */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_CancelOpen(tGATT_IF server_if, const RawAddress& remote_bda,
                          bool is_direct) {
void BTA_GATTS_CancelOpen(tGATT_IF /* server_if */,
                          const RawAddress& /* remote_bda */,
                          bool /* is_direct */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_Close(uint16_t conn_id) { inc_func_call_count(__func__); }
void BTA_GATTS_AddService(tGATT_IF server_if,
                          std::vector<btgatt_db_element_t> service,
                          BTA_GATTS_AddServiceCb cb) {
void BTA_GATTS_Close(uint16_t /* conn_id */) { inc_func_call_count(__func__); }
void BTA_GATTS_AddService(tGATT_IF /* server_if */,
                          std::vector<btgatt_db_element_t> /* service */,
                          BTA_GATTS_AddServiceCb /* cb */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_DeleteService(uint16_t service_id) {
void BTA_GATTS_DeleteService(uint16_t /* service_id */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_HandleValueIndication(uint16_t conn_id, uint16_t attr_id,
                                     std::vector<uint8_t> value,
                                     bool need_confirm) {
void BTA_GATTS_HandleValueIndication(uint16_t /* conn_id */,
                                     uint16_t /* attr_id */,
                                     std::vector<uint8_t> /* value */,
                                     bool /* need_confirm */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_Open(tGATT_IF server_if, const RawAddress& remote_bda,
                    bool is_direct, tBT_TRANSPORT transport) {
void BTA_GATTS_Open(tGATT_IF /* server_if */,
                    const RawAddress& /* remote_bda */, bool /* is_direct */,
                    tBT_TRANSPORT /* transport */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, tGATT_STATUS status,
                       tGATTS_RSP* p_msg) {
void BTA_GATTS_SendRsp(uint16_t /* conn_id */, uint32_t /* trans_id */,
                       tGATT_STATUS /* status */, tGATTS_RSP* /* p_msg */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_StopService(uint16_t service_id) {
void BTA_GATTS_StopService(uint16_t /* service_id */) {
  inc_func_call_count(__func__);
}
void bta_gatts_add_service_impl(tGATT_IF server_if,
                                std::vector<btgatt_db_element_t> service,
                                BTA_GATTS_AddServiceCb cb) {
void bta_gatts_add_service_impl(tGATT_IF /* server_if */,
                                std::vector<btgatt_db_element_t> /* service */,
                                BTA_GATTS_AddServiceCb /* cb */) {
  inc_func_call_count(__func__);
}
void BTA_GATTS_InitBonded(void) { inc_func_call_count(__func__); }
+22 −18
Original line number Diff line number Diff line
@@ -42,34 +42,37 @@ class HalVersionManager {
}  // namespace bluetooth

void LeAudioClient::AddFromStorage(
    const RawAddress& addr, bool autoconnect, int sink_audio_location,
    int source_audio_location, int sink_supported_context_types,
    int source_supported_context_types, const std::vector<uint8_t>& handles,
    const std::vector<uint8_t>& sink_pacs,
    const std::vector<uint8_t>& source_pacs, const std::vector<uint8_t>& ases) {
    const RawAddress& /* addr */, bool /* autoconnect */,
    int /* sink_audio_location */, int /* source_audio_location */,
    int /* sink_supported_context_types */,
    int /* source_supported_context_types */,
    const std::vector<uint8_t>& /* handles */,
    const std::vector<uint8_t>& /* sink_pacs */,
    const std::vector<uint8_t>& /* source_pacs */,
    const std::vector<uint8_t>& /* ases */) {
  inc_func_call_count(__func__);
}

bool LeAudioClient::GetHandlesForStorage(const RawAddress& addr,
                                         std::vector<uint8_t>& out) {
bool LeAudioClient::GetHandlesForStorage(const RawAddress& /* addr */,
                                         std::vector<uint8_t>& /* out */) {
  inc_func_call_count(__func__);
  return false;
}

bool LeAudioClient::GetSinkPacsForStorage(const RawAddress& addr,
                                          std::vector<uint8_t>& out) {
bool LeAudioClient::GetSinkPacsForStorage(const RawAddress& /* addr */,
                                          std::vector<uint8_t>& /* out */) {
  inc_func_call_count(__func__);
  return false;
}

bool LeAudioClient::GetSourcePacsForStorage(const RawAddress& addr,
                                            std::vector<uint8_t>& out) {
bool LeAudioClient::GetSourcePacsForStorage(const RawAddress& /* addr */,
                                            std::vector<uint8_t>& /* out */) {
  inc_func_call_count(__func__);
  return false;
}

bool LeAudioClient::GetAsesForStorage(const RawAddress& addr,
                                      std::vector<uint8_t>& out) {
bool LeAudioClient::GetAsesForStorage(const RawAddress& /* addr */,
                                      std::vector<uint8_t>& /* out */) {
  inc_func_call_count(__func__);
  return false;
}
@@ -89,15 +92,16 @@ bool LeAudioClient::IsLeAudioClientInStreaming(void) {
  return false;
}
void LeAudioClient::Initialize(
    bluetooth::le_audio::LeAudioClientCallbacks* callbacks_,
    base::Closure initCb, base::Callback<bool()> hal_2_1_verifier,
    bluetooth::le_audio::LeAudioClientCallbacks* /* callbacks_ */,
    base::Closure /* initCb */, base::Callback<bool()> /* hal_2_1_verifier */,
    const std::vector<bluetooth::le_audio::btle_audio_codec_config_t>&
        offloading_preference) {
    /* offloading_preference */) {
  inc_func_call_count(__func__);
}
void LeAudioClient::DebugDump(int fd) { inc_func_call_count(__func__); }
void LeAudioClient::DebugDump(int /* fd */) { inc_func_call_count(__func__); }

bool LeAudioClient::RegisterIsoDataConsumer(LeAudioIsoDataCallback callback) {
bool LeAudioClient::RegisterIsoDataConsumer(
    LeAudioIsoDataCallback /* callback */) {
  inc_func_call_count(__func__);
  return true;
}
+2 −2
Original line number Diff line number Diff line
@@ -24,11 +24,11 @@
#include "bta/include/bta_rfcomm_scn.h"
#include "test/common/mock_functions.h"

bool BTA_FreeSCN(uint8_t scn) {
bool BTA_FreeSCN(uint8_t /* scn */) {
  inc_func_call_count(__func__);
  return false;
}
bool BTA_TryAllocateSCN(uint8_t scn) {
bool BTA_TryAllocateSCN(uint8_t /* scn */) {
  inc_func_call_count(__func__);
  return false;
}
+6 −7
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ namespace bta_sdp_api {
struct BTA_SdpCreateRecordByUser {
  static tBTA_SDP_STATUS return_value;
  std::function<tBTA_SDP_STATUS(void* user_data)> body{
      [](void* user_data) { return return_value; }};
      [](void* /* user_data */) { return return_value; }};
  tBTA_SDP_STATUS operator()(void* user_data) { return body(user_data); };
};
extern struct BTA_SdpCreateRecordByUser BTA_SdpCreateRecordByUser;
@@ -53,7 +53,7 @@ extern struct BTA_SdpCreateRecordByUser BTA_SdpCreateRecordByUser;
// Params: int fd
// Return: void
struct BTA_SdpDumpsys {
  std::function<void(int fd)> body{[](int fd) {}};
  std::function<void(int fd)> body{[](int /* fd */) {}};
  void operator()(int fd) { body(fd); };
};
extern struct BTA_SdpDumpsys BTA_SdpDumpsys;
@@ -64,7 +64,7 @@ extern struct BTA_SdpDumpsys BTA_SdpDumpsys;
struct BTA_SdpEnable {
  static tBTA_SDP_STATUS return_value;
  std::function<tBTA_SDP_STATUS(tBTA_SDP_DM_CBACK* p_cback)> body{
      [](tBTA_SDP_DM_CBACK* p_cback) { return return_value; }};
      [](tBTA_SDP_DM_CBACK* /* p_cback */) { return return_value; }};
  tBTA_SDP_STATUS operator()(tBTA_SDP_DM_CBACK* p_cback) {
    return body(p_cback);
  };
@@ -77,7 +77,7 @@ extern struct BTA_SdpEnable BTA_SdpEnable;
struct BTA_SdpRemoveRecordByUser {
  static tBTA_SDP_STATUS return_value;
  std::function<tBTA_SDP_STATUS(void* user_data)> body{
      [](void* user_data) { return return_value; }};
      [](void* /* user_data */) { return return_value; }};
  tBTA_SDP_STATUS operator()(void* user_data) { return body(user_data); };
};
extern struct BTA_SdpRemoveRecordByUser BTA_SdpRemoveRecordByUser;
@@ -89,9 +89,8 @@ struct BTA_SdpSearch {
  static tBTA_SDP_STATUS return_value;
  std::function<tBTA_SDP_STATUS(const RawAddress& bd_addr,
                                const bluetooth::Uuid& uuid)>
      body{[](const RawAddress& bd_addr, const bluetooth::Uuid& uuid) {
        return return_value;
      }};
      body{[](const RawAddress& /* bd_addr */,
              const bluetooth::Uuid& /* uuid */) { return return_value; }};
  tBTA_SDP_STATUS operator()(const RawAddress& bd_addr,
                             const bluetooth::Uuid& uuid) {
    return body(bd_addr, uuid);
Loading