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

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

Remove unused function btif_storage_set_remote_addr_type

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I8d586fab075fdf4fbde237eeaaa72ae39cff8baa
parent 6656ac9f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -377,8 +377,6 @@ bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,

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

void btif_storage_add_groups(const RawAddress& addr);
void btif_storage_load_bonded_groups(void);
+0 −14
Original line number Diff line number Diff line
@@ -1347,20 +1347,6 @@ bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
  return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
}

void btif_storage_set_remote_addr_type(const RawAddress& remote_bd_addr,
                                       const tBLE_ADDR_TYPE& addr_type) {
  if (!btif_config_set_int(remote_bd_addr.ToString(),
                           BTIF_STORAGE_KEY_ADDR_TYPE,
                           static_cast<int>(addr_type)))
    log::error("Unable to set storage property");
  else {
#if TARGET_FLOSS
    // Floss needs to get address type for diagnosis API.
    btif_storage_invoke_addr_type_update(remote_bd_addr, addr_type);
#endif
  }
}

bool btif_has_ble_keys(const std::string& bdstr) {
  return btif_config_exist(bdstr, BTIF_STORAGE_KEY_LE_KEY_PENC);
}
+0 −7
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ struct btif_storage_set_gatt_cl_db_hash btif_storage_set_gatt_cl_db_hash;
struct btif_storage_set_gatt_cl_supp_feat btif_storage_set_gatt_cl_supp_feat;
struct btif_storage_set_gatt_sr_supp_feat btif_storage_set_gatt_sr_supp_feat;
struct btif_storage_set_remote_addr_type btif_storage_set_remote_addr_type;
struct btif_storage_set_remote_addr_type2 btif_storage_set_remote_addr_type2;
struct btif_storage_set_remote_device_property
    btif_storage_set_remote_device_property;

@@ -311,12 +310,6 @@ bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
  return test::mock::btif_storage::btif_storage_set_remote_addr_type(
      remote_bd_addr, addr_type);
}
void btif_storage_set_remote_addr_type(const RawAddress& remote_bd_addr,
                                       const tBLE_ADDR_TYPE& addr_type) {
  inc_func_call_count(__func__);
  test::mock::btif_storage::btif_storage_set_remote_addr_type2(remote_bd_addr,
                                                               addr_type);
}
bt_status_t btif_storage_set_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
@@ -543,22 +543,6 @@ struct btif_storage_set_remote_addr_type {
extern struct btif_storage_set_remote_addr_type
    btif_storage_set_remote_addr_type;

// Name: btif_storage_set_remote_addr_type
// Params: const RawAddress& remote_bd_addr, const tBLE_ADDR_TYPE& addr_type
// Return: void
struct btif_storage_set_remote_addr_type2 {
  std::function<void(const RawAddress& remote_bd_addr,
                     const tBLE_ADDR_TYPE& addr_type)>
      body{[](const RawAddress& /* remote_bd_addr */,
              const tBLE_ADDR_TYPE& /* addr_type */) {}};
  void operator()(const RawAddress& remote_bd_addr,
                  const tBLE_ADDR_TYPE& addr_type) {
    body(remote_bd_addr, addr_type);
  };
};
extern struct btif_storage_set_remote_addr_type2
    btif_storage_set_remote_addr_type2;

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