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

Commit 6656ac9f authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove unused function btif_storage_get_remote_device_type

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I3d8c5700a4e4eb2794faf127c17a707944bfdb6d
parent a88a315b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -379,8 +379,6 @@ 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);
bool btif_storage_get_remote_device_type(const RawAddress& remote_bd_addr,
                                         tBT_DEVICE_TYPE& device_type);

void btif_storage_add_groups(const RawAddress& addr);
void btif_storage_load_bonded_groups(void);
+0 −9
Original line number Diff line number Diff line
@@ -1393,15 +1393,6 @@ bool btif_storage_get_remote_addr_type(const RawAddress& remote_bd_addr,
  return ret;
}

bool btif_storage_get_remote_device_type(const RawAddress& remote_bd_addr,
                                         tBT_DEVICE_TYPE& device_type) {
  int val;
  bool ret = btif_config_get_int(remote_bd_addr.ToString(),
                                 BTIF_STORAGE_KEY_DEV_TYPE, &val);
  device_type = static_cast<tBT_DEVICE_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
@@ -57,7 +57,6 @@ 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_device_type btif_storage_get_remote_device_type;
struct btif_storage_get_remote_prop btif_storage_get_remote_prop;
struct btif_storage_get_sr_supp_feat btif_storage_get_sr_supp_feat;
struct btif_storage_get_stored_remote_name btif_storage_get_stored_remote_name;
@@ -109,7 +108,6 @@ 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;
bool btif_storage_get_remote_device_type::return_value = false;
bt_status_t btif_storage_get_remote_prop::return_value = BT_STATUS_SUCCESS;
uint8_t btif_storage_get_sr_supp_feat::return_value = 0;
bool btif_storage_get_stored_remote_name::return_value = false;
@@ -234,12 +232,6 @@ bt_status_t btif_storage_get_remote_device_property(
  return test::mock::btif_storage::btif_storage_get_remote_device_property(
      remote_bd_addr, property);
}
bool btif_storage_get_remote_device_type(const RawAddress& remote_bd_addr,
                                         tBT_DEVICE_TYPE& device_type) {
  inc_func_call_count(__func__);
  return test::mock::btif_storage::btif_storage_get_remote_device_type(
      remote_bd_addr, device_type);
}
bt_status_t btif_storage_get_remote_prop(RawAddress* remote_addr,
                                         bt_property_type_t type, void* buf,
                                         int size, bt_property_t* property) {
+0 −17
Original line number Diff line number Diff line
@@ -323,23 +323,6 @@ struct btif_storage_get_remote_device_property {
extern struct btif_storage_get_remote_device_property
    btif_storage_get_remote_device_property;

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

// Name: btif_storage_get_remote_prop
// Params: RawAddress* remote_addr, bt_property_type_t type, void* buf, int
// size, bt_property_t* property Return: bt_status_t