Loading system/btif/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ cc_library_static { ], shared_libs: [ "libcrypto", "libcutils", ], cflags: [ /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/ Loading system/btif/include/btif_config.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ bool btif_config_remove(const std::string& section, const std::string& key); void btif_config_remove_device(const std::string& section); void btif_config_remove_device_with_key(const std::string& key); size_t btif_config_get_bin_length(const std::string& section, const std::string& key); std::vector<RawAddress> btif_config_get_paired_devices(); Loading system/btif/include/btif_storage.h +11 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,17 @@ void btif_storage_set_leaudio_has_acceptlist(const RawAddress& address, bool add ******************************************************************************/ bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr); /******************************************************************************* * * Function btif_storage_prune_devices * * Description Removes restricted mode devices in non-restricted mode * * Returns none * ******************************************************************************/ void btif_storage_prune_devices(); bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr, const uint8_t* key, uint8_t key_type, uint8_t key_length); bt_status_t btif_storage_get_ble_bonding_key(const RawAddress& remote_bd_addr, uint8_t key_type, Loading system/btif/src/btif_config.cc +6 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,12 @@ void btif_config_remove_device(const std::string& section) { bluetooth::shim::BtifConfigInterface::RemoveSection(section); } void btif_config_remove_device_with_key(const std::string& key) { log::assert_that(bluetooth::shim::is_gd_stack_started_up(), "assert failed: bluetooth::shim::is_gd_stack_started_up()"); bluetooth::shim::BtifConfigInterface::RemoveSectionWithProperty(key); } bool btif_config_clear(void) { log::assert_that(bluetooth::shim::is_gd_stack_started_up(), "assert failed: bluetooth::shim::is_gd_stack_started_up()"); Loading system/btif/src/btif_dm.cc +4 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ #include "btif_api.h" #include "btif_bqr.h" #include "btif_config.h" #include "btif_dm.h" #include "btif_metrics_logging.h" #include "btif_sdp.h" #include "btif_storage.h" Loading Loading @@ -1923,6 +1922,10 @@ void BTIF_dm_report_inquiry_status_change(tBTM_INQUIRY_STATE status) { } void BTIF_dm_enable() { if (com::android::bluetooth::flags::guest_mode_bond()) { btif_storage_prune_devices(); } BD_NAME bdname; bt_status_t status; bt_property_t prop; Loading Loading
system/btif/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ cc_library_static { ], shared_libs: [ "libcrypto", "libcutils", ], cflags: [ /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/ Loading
system/btif/include/btif_config.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ bool btif_config_remove(const std::string& section, const std::string& key); void btif_config_remove_device(const std::string& section); void btif_config_remove_device_with_key(const std::string& key); size_t btif_config_get_bin_length(const std::string& section, const std::string& key); std::vector<RawAddress> btif_config_get_paired_devices(); Loading
system/btif/include/btif_storage.h +11 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,17 @@ void btif_storage_set_leaudio_has_acceptlist(const RawAddress& address, bool add ******************************************************************************/ bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr); /******************************************************************************* * * Function btif_storage_prune_devices * * Description Removes restricted mode devices in non-restricted mode * * Returns none * ******************************************************************************/ void btif_storage_prune_devices(); bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr, const uint8_t* key, uint8_t key_type, uint8_t key_length); bt_status_t btif_storage_get_ble_bonding_key(const RawAddress& remote_bd_addr, uint8_t key_type, Loading
system/btif/src/btif_config.cc +6 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,12 @@ void btif_config_remove_device(const std::string& section) { bluetooth::shim::BtifConfigInterface::RemoveSection(section); } void btif_config_remove_device_with_key(const std::string& key) { log::assert_that(bluetooth::shim::is_gd_stack_started_up(), "assert failed: bluetooth::shim::is_gd_stack_started_up()"); bluetooth::shim::BtifConfigInterface::RemoveSectionWithProperty(key); } bool btif_config_clear(void) { log::assert_that(bluetooth::shim::is_gd_stack_started_up(), "assert failed: bluetooth::shim::is_gd_stack_started_up()"); Loading
system/btif/src/btif_dm.cc +4 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ #include "btif_api.h" #include "btif_bqr.h" #include "btif_config.h" #include "btif_dm.h" #include "btif_metrics_logging.h" #include "btif_sdp.h" #include "btif_storage.h" Loading Loading @@ -1923,6 +1922,10 @@ void BTIF_dm_report_inquiry_status_change(tBTM_INQUIRY_STATE status) { } void BTIF_dm_enable() { if (com::android::bluetooth::flags::guest_mode_bond()) { btif_storage_prune_devices(); } BD_NAME bdname; bt_status_t status; bt_property_t prop; Loading