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

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

Remove unused function btif_storage_get_remote_addr_type

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: Id3dde894c5bf855e5bb1bddd52e30c486be46bf8
parent b7763e3f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -375,9 +375,6 @@ bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
                                              tBLE_ADDR_TYPE addr_type);

bool btif_storage_get_remote_addr_type(const RawAddress& remote_bd_addr,
                                       tBLE_ADDR_TYPE& addr_type);

void btif_storage_add_groups(const RawAddress& addr);
void btif_storage_load_bonded_groups(void);
void btif_storage_remove_groups(const RawAddress& address);
+0 −9
Original line number Diff line number Diff line
@@ -1370,15 +1370,6 @@ bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
  return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
}

bool btif_storage_get_remote_addr_type(const RawAddress& remote_bd_addr,
                                       tBLE_ADDR_TYPE& addr_type) {
  int val;
  bool ret = btif_config_get_int(remote_bd_addr.ToString(),
                                 BTIF_STORAGE_KEY_ADDR_TYPE, &val);
  addr_type = static_cast<tBLE_ADDR_TYPE>(val);
  return ret;
}

/** Stores information about GATT server supported features */
void btif_storage_set_gatt_sr_supp_feat(const RawAddress& addr, uint8_t feat) {
  do_in_jni_thread(
+0 −8
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ struct btif_storage_get_gatt_cl_db_hash btif_storage_get_gatt_cl_db_hash;
struct btif_storage_get_gatt_cl_supp_feat btif_storage_get_gatt_cl_supp_feat;
struct btif_storage_get_local_io_caps btif_storage_get_local_io_caps;
struct btif_storage_get_remote_addr_type btif_storage_get_remote_addr_type;
struct btif_storage_get_remote_addr_type2 btif_storage_get_remote_addr_type2;
struct btif_storage_get_remote_device_property
    btif_storage_get_remote_device_property;
struct btif_storage_get_remote_prop btif_storage_get_remote_prop;
@@ -104,7 +103,6 @@ Octet16 btif_storage_get_gatt_cl_db_hash::return_value = {};
uint8_t btif_storage_get_gatt_cl_supp_feat::return_value = 0;
tBTM_IO_CAP btif_storage_get_local_io_caps::return_value = 0;
bt_status_t btif_storage_get_remote_addr_type::return_value = BT_STATUS_SUCCESS;
bool btif_storage_get_remote_addr_type2::return_value = false;
bt_status_t btif_storage_get_remote_device_property::return_value =
    BT_STATUS_SUCCESS;
bt_status_t btif_storage_get_remote_prop::return_value = BT_STATUS_SUCCESS;
@@ -219,12 +217,6 @@ bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
  return test::mock::btif_storage::btif_storage_get_remote_addr_type(
      remote_bd_addr, addr_type);
}
bool btif_storage_get_remote_addr_type(const RawAddress& remote_bd_addr,
                                       tBLE_ADDR_TYPE& addr_type) {
  inc_func_call_count(__func__);
  return test::mock::btif_storage::btif_storage_get_remote_addr_type2(
      remote_bd_addr, addr_type);
}
bt_status_t btif_storage_get_remote_device_property(
    const RawAddress* remote_bd_addr, bt_property_t* property) {
  inc_func_call_count(__func__);
+0 −16
Original line number Diff line number Diff line
@@ -290,22 +290,6 @@ struct btif_storage_get_remote_addr_type {
extern struct btif_storage_get_remote_addr_type
    btif_storage_get_remote_addr_type;

// Name: btif_storage_get_remote_addr_type2
// Params: const RawAddress& remote_bd_addr, tBLE_ADDR_TYPE& addr_type
// Return: bool
struct btif_storage_get_remote_addr_type2 {
  static bool return_value;
  std::function<bool(const RawAddress& remote_bd_addr,
                     tBLE_ADDR_TYPE& addr_type)>
      body{[](const RawAddress& /* remote_bd_addr */,
              tBLE_ADDR_TYPE& /* addr_type */) { return return_value; }};
  bool operator()(const RawAddress& remote_bd_addr, tBLE_ADDR_TYPE& addr_type) {
    return body(remote_bd_addr, addr_type);
  };
};
extern struct btif_storage_get_remote_addr_type2
    btif_storage_get_remote_addr_type2;

// Name: btif_storage_get_remote_device_property
// Params: const RawAddress* remote_bd_addr, bt_property_t* property
// Return: bt_status_t