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

Commit 16bfc606 authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove unused function btif_storage_get_num_bonded_devices

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I83dfdaae20425bf3a65dfd8b3f8c748f5d2a6e39
parent a444f4cd
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -353,8 +353,6 @@ void btif_storage_set_leaudio_has_acceptlist(const RawAddress& address,
 ******************************************************************************/
bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr);

int btif_storage_get_num_bonded_devices(void);

bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr,
                                             const uint8_t* key,
                                             uint8_t key_type,
+0 −6
Original line number Diff line number Diff line
@@ -1474,12 +1474,6 @@ bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr) {
                             BTIF_STORAGE_KEY_RESTRICTED, &val);
}

int btif_storage_get_num_bonded_devices(void) {
  btif_bonded_devices_t bonded_devices;
  btif_in_fetch_bonded_devices(&bonded_devices, 0);
  return bonded_devices.num_devices;
}

// Get the name of a device from btif for interop database matching.
bool btif_storage_get_stored_remote_name(const RawAddress& bd_addr,
                                         char* name) {
+0 −6
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ struct btif_storage_get_ble_local_key btif_storage_get_ble_local_key;
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_num_bonded_devices btif_storage_get_num_bonded_devices;
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
@@ -108,7 +107,6 @@ bt_status_t btif_storage_get_ble_local_key::return_value = BT_STATUS_SUCCESS;
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;
int btif_storage_get_num_bonded_devices::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 =
@@ -222,10 +220,6 @@ tBTM_IO_CAP btif_storage_get_local_io_caps() {
  inc_func_call_count(__func__);
  return test::mock::btif_storage::btif_storage_get_local_io_caps();
}
int btif_storage_get_num_bonded_devices(void) {
  inc_func_call_count(__func__);
  return test::mock::btif_storage::btif_storage_get_num_bonded_devices();
}
bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
                                              tBLE_ADDR_TYPE* addr_type) {
  inc_func_call_count(__func__);
+0 −11
Original line number Diff line number Diff line
@@ -271,17 +271,6 @@ struct btif_storage_get_local_io_caps {
};
extern struct btif_storage_get_local_io_caps btif_storage_get_local_io_caps;

// Name: btif_storage_get_num_bonded_devices
// Params: void
// Return: int
struct btif_storage_get_num_bonded_devices {
  static int return_value;
  std::function<int(void)> body{[](void) { return return_value; }};
  int operator()(void) { return body(); };
};
extern struct btif_storage_get_num_bonded_devices
    btif_storage_get_num_bonded_devices;

// Name: btif_storage_get_remote_addr_type
// Params: const RawAddress* remote_bd_addr, tBLE_ADDR_TYPE addr_type
// Return: bt_status_t