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

Commit dc5bf162 authored by Jacky Cheung's avatar Jacky Cheung Committed by Calvin On
Browse files

Add storage API to get number of bonded devices

Test: manual
Change-Id: Iaded8031bf706d84cff68f78dff8feb887a159a4
parent 119be801
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -243,6 +243,8 @@ void btif_storage_remove_hearing_aid_white_list(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,
+6 −0
Original line number Diff line number Diff line
@@ -1572,6 +1572,12 @@ bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr) {
  return btif_config_exist(remote_bd_addr->ToString(), "Restricted");
}

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;
}

/*******************************************************************************
 * Function         btif_storage_load_hidd
 *