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

Commit e9fd4905 authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove unused function BTM_GetClockOffset

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I2f6b8e7f08a190de489ddc41e2b8c75f4dbd6eec
parent 5ae07b0f
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -4385,11 +4385,6 @@ void btm_sec_update_clock_offset(uint16_t handle, uint16_t clock_offset) {
  p_inq_info->results.clock_offset = clock_offset | BTM_CLOCK_OFFSET_VALID;
}

uint16_t BTM_GetClockOffset(const RawAddress& remote_bda) {
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(remote_bda);
  return (p_dev_rec) ? p_dev_rec->clock_offset : 0;
}

/******************************************************************
 * S T A T I C     F U N C T I O N S
 ******************************************************************/
+0 −2
Original line number Diff line number Diff line
@@ -742,8 +742,6 @@ void SendRemoteNameRequest(const RawAddress& raw_address);

bool BTM_IsScoActiveByBdaddr(const RawAddress& remote_bda);

uint16_t BTM_GetClockOffset(const RawAddress& remote_bda);

/* Read maximum data packet that can be sent over current connection */
uint16_t BTM_GetMaxPacketSize(const RawAddress& addr);

+0 −6
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ namespace stack_btm_sec {
struct BTM_CanReadDiscoverableCharacteristics
    BTM_CanReadDiscoverableCharacteristics;
struct BTM_ConfirmReqReply BTM_ConfirmReqReply;
struct BTM_GetClockOffset BTM_GetClockOffset;
struct BTM_GetPeerDeviceTypeFromFeatures BTM_GetPeerDeviceTypeFromFeatures;
struct BTM_IsAuthenticated BTM_IsAuthenticated;
struct BTM_IsEncrypted BTM_IsEncrypted;
@@ -117,7 +116,6 @@ namespace mock {
namespace stack_btm_sec {

bool BTM_CanReadDiscoverableCharacteristics::return_value = false;
uint16_t BTM_GetClockOffset::return_value = 0;
tBT_DEVICE_TYPE BTM_GetPeerDeviceTypeFromFeatures::return_value = 0;
bool BTM_IsAuthenticated::return_value = false;
bool BTM_IsEncrypted::return_value = false;
@@ -159,10 +157,6 @@ void BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr) {
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::BTM_ConfirmReqReply(res, bd_addr);
}
uint16_t BTM_GetClockOffset(const RawAddress& remote_bda) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_sec::BTM_GetClockOffset(remote_bda);
}
tBT_DEVICE_TYPE BTM_GetPeerDeviceTypeFromFeatures(const RawAddress& bd_addr) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_sec::BTM_GetPeerDeviceTypeFromFeatures(bd_addr);
+0 −13
Original line number Diff line number Diff line
@@ -69,19 +69,6 @@ struct BTM_ConfirmReqReply {
};
extern struct BTM_ConfirmReqReply BTM_ConfirmReqReply;

// Name: BTM_GetClockOffset
// Params: const RawAddress& remote_bda
// Return: uint16_t
struct BTM_GetClockOffset {
  static uint16_t return_value;
  std::function<uint16_t(const RawAddress& remote_bda)> body{
      [](const RawAddress& /* remote_bda */) { return return_value; }};
  uint16_t operator()(const RawAddress& remote_bda) {
    return body(remote_bda);
  };
};
extern struct BTM_GetClockOffset BTM_GetClockOffset;

// Name: BTM_GetPeerDeviceTypeFromFeatures
// Params: const RawAddress& bd_addr
// Return: tBT_DEVICE_TYPE