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

Commit 9613c1e6 authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove unused function btif_storage_remove_ble_local_keys

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: Icc6c21e65a62792d8e64565a7e3433b7c3544912
parent f5be6523
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -366,7 +366,6 @@ bt_status_t btif_storage_add_ble_local_key(const Octet16& key,
                                           uint8_t key_type);
bt_status_t btif_storage_remove_ble_bonding_keys(
    const RawAddress* remote_bd_addr);
bt_status_t btif_storage_remove_ble_local_keys(void);
bt_status_t btif_storage_get_ble_local_key(uint8_t key_type,
                                           Octet16* key_value);

+0 −20
Original line number Diff line number Diff line
@@ -1278,26 +1278,6 @@ bt_status_t btif_storage_get_ble_local_key(uint8_t key_type,
  return BT_STATUS_FAIL;
}

/*******************************************************************************
 *
 * Function         btif_storage_remove_ble_local_keys
 *
 * Description      BTIF storage API - Deletes the bonded device from NVRAM
 *
 * Returns          BT_STATUS_SUCCESS if the deletion was successful,
 *                  BT_STATUS_FAIL otherwise
 *
 ******************************************************************************/
bt_status_t btif_storage_remove_ble_local_keys(void) {
  bool ret = true;
  for (size_t i = 0; i < std::size(BTIF_STORAGE_LOCAL_LE_KEYS); i++) {
    auto key = BTIF_STORAGE_LOCAL_LE_KEYS[i];
    if (btif_config_exist(BTIF_STORAGE_SECTION_ADAPTER, key.name))
      ret &= btif_config_remove(BTIF_STORAGE_SECTION_ADAPTER, key.name);
  }
  return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
}

bt_status_t btif_in_fetch_bonded_ble_device(
    const std::string& remote_bd_addr, int add,
    btif_bonded_devices_t* p_bonded_devices) {
+0 −7
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ struct btif_storage_load_bonded_devices btif_storage_load_bonded_devices;
struct btif_storage_load_le_devices btif_storage_load_le_devices;
struct btif_storage_remove_ble_bonding_keys
    btif_storage_remove_ble_bonding_keys;
struct btif_storage_remove_ble_local_keys btif_storage_remove_ble_local_keys;
struct btif_storage_remove_bonded_device btif_storage_remove_bonded_device;
struct btif_storage_remove_gatt_cl_db_hash btif_storage_remove_gatt_cl_db_hash;
struct btif_storage_remove_gatt_cl_supp_feat
@@ -119,8 +118,6 @@ bool btif_storage_is_restricted_device::return_value = false;
bt_status_t btif_storage_load_bonded_devices::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_remove_ble_bonding_keys::return_value =
    BT_STATUS_SUCCESS;
bt_status_t btif_storage_remove_ble_local_keys::return_value =
    BT_STATUS_SUCCESS;
bt_status_t btif_storage_remove_bonded_device::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_set_adapter_property::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_set_remote_device_property::return_value =
@@ -286,10 +283,6 @@ bt_status_t btif_storage_remove_ble_bonding_keys(
  return test::mock::btif_storage::btif_storage_remove_ble_bonding_keys(
      remote_bd_addr);
}
bt_status_t btif_storage_remove_ble_local_keys(void) {
  inc_func_call_count(__func__);
  return test::mock::btif_storage::btif_storage_remove_ble_local_keys();
}
bt_status_t btif_storage_remove_bonded_device(
    const RawAddress* remote_bd_addr) {
  inc_func_call_count(__func__);