Loading flags/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ aconfig_declarations { "btif_dm.aconfig", "btm_ble.aconfig", "connectivity.aconfig", "device_iot_config.aconfig", "dis.aconfig", "framework.aconfig", "gap.aconfig", Loading flags/BUILD.gn +0 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ aconfig("bluetooth_flags_c_lib") { "btif_dm.aconfig", "btm_ble.aconfig", "connectivity.aconfig", "device_iot_config.aconfig", "dis.aconfig", "framework.aconfig", "gap.aconfig", Loading flags/device_iot_config.aconfigdeleted 100644 → 0 +0 −9 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.bt" flag { name: "device_iot_config_logging" namespace: "bluetooth" description: "Enable device IOT information storage." bug: "290844229" } system/device/Android.bp +0 −3 Original line number Diff line number Diff line Loading @@ -95,17 +95,14 @@ cc_test { "liblog", ], static_libs: [ "bluetooth_flags_c_lib", "libbluetooth-types", "libbluetooth_log", "libbt-platform-protos-lite", "libbtcore", "libbtdevice", "libchrome", "libflagtest", "libgmock", "libosi", "server_configurable_flags", ], header_libs: ["libbluetooth_headers"], } system/device/src/device_iot_config.cc +0 −69 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include "device/include/device_iot_config.h" #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <ctype.h> #include <string.h> #include <time.h> Loading Loading @@ -49,10 +48,6 @@ alarm_t* config_timer; using namespace bluetooth; bool device_iot_config_has_section(const std::string& section) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -60,10 +55,6 @@ bool device_iot_config_has_section(const std::string& section) { } bool device_iot_config_exist(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -71,10 +62,6 @@ bool device_iot_config_exist(const std::string& section, const std::string& key) } bool device_iot_config_get_int(const std::string& section, const std::string& key, int& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -87,10 +74,6 @@ bool device_iot_config_get_int(const std::string& section, const std::string& ke } bool device_iot_config_set_int(const std::string& section, const std::string& key, int value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -107,10 +90,6 @@ bool device_iot_config_set_int(const std::string& section, const std::string& ke } bool device_iot_config_int_add_one(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); int result = 0; Loading @@ -128,10 +107,6 @@ bool device_iot_config_int_add_one(const std::string& section, const std::string } bool device_iot_config_get_hex(const std::string& section, const std::string& key, int& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading Loading @@ -159,10 +134,6 @@ bool device_iot_config_get_hex(const std::string& section, const std::string& ke bool device_iot_config_set_hex(const std::string& section, const std::string& key, int value, int byte_num) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); char value_str[32] = {0}; Loading @@ -189,10 +160,6 @@ bool device_iot_config_set_hex(const std::string& section, const std::string& ke bool device_iot_config_set_hex_if_greater(const std::string& section, const std::string& key, int value, int byte_num) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } int stored_value = 0; bool ret = device_iot_config_get_hex(section, key, stored_value); if (ret && stored_value >= value) { Loading @@ -204,10 +171,6 @@ bool device_iot_config_set_hex_if_greater(const std::string& section, const std: bool device_iot_config_get_str(const std::string& section, const std::string& key, char* value, int* size_bytes) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(value != NULL, "assert failed: value != NULL"); log::assert_that(size_bytes != NULL, "assert failed: size_bytes != NULL"); Loading @@ -227,10 +190,6 @@ bool device_iot_config_get_str(const std::string& section, const std::string& ke bool device_iot_config_set_str(const std::string& section, const std::string& key, const std::string& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -246,10 +205,6 @@ bool device_iot_config_set_str(const std::string& section, const std::string& ke bool device_iot_config_get_bin(const std::string& section, const std::string& key, uint8_t* value, size_t* length) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(value != NULL, "assert failed: value != NULL"); log::assert_that(length != NULL, "assert failed: length != NULL"); Loading Loading @@ -293,10 +248,6 @@ bool device_iot_config_get_bin(const std::string& section, const std::string& ke } size_t device_iot_config_get_bin_length(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return 0; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -312,10 +263,6 @@ size_t device_iot_config_get_bin_length(const std::string& section, const std::s bool device_iot_config_set_bin(const std::string& section, const std::string& key, const uint8_t* value, size_t length) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } const char* lookup = "0123456789abcdef"; log::assert_that(config != NULL, "assert failed: config != NULL"); Loading Loading @@ -350,10 +297,6 @@ bool device_iot_config_set_bin(const std::string& section, const std::string& ke } bool device_iot_config_remove(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -361,10 +304,6 @@ bool device_iot_config_remove(const std::string& section, const std::string& key } void device_iot_config_flush(void) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(config_timer != NULL, "assert failed: config_timer != NULL"); Loading @@ -376,10 +315,6 @@ void device_iot_config_flush(void) { } bool device_iot_config_clear(void) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return true; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(config_timer != NULL, "assert failed: config_timer != NULL"); Loading @@ -400,10 +335,6 @@ bool device_iot_config_clear(void) { } void device_debug_iot_config_dump(int fd) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return; } dprintf(fd, "\nBluetooth Iot Config:\n"); dprintf(fd, " Config Source: "); Loading Loading
flags/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ aconfig_declarations { "btif_dm.aconfig", "btm_ble.aconfig", "connectivity.aconfig", "device_iot_config.aconfig", "dis.aconfig", "framework.aconfig", "gap.aconfig", Loading
flags/BUILD.gn +0 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ aconfig("bluetooth_flags_c_lib") { "btif_dm.aconfig", "btm_ble.aconfig", "connectivity.aconfig", "device_iot_config.aconfig", "dis.aconfig", "framework.aconfig", "gap.aconfig", Loading
flags/device_iot_config.aconfigdeleted 100644 → 0 +0 −9 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.bt" flag { name: "device_iot_config_logging" namespace: "bluetooth" description: "Enable device IOT information storage." bug: "290844229" }
system/device/Android.bp +0 −3 Original line number Diff line number Diff line Loading @@ -95,17 +95,14 @@ cc_test { "liblog", ], static_libs: [ "bluetooth_flags_c_lib", "libbluetooth-types", "libbluetooth_log", "libbt-platform-protos-lite", "libbtcore", "libbtdevice", "libchrome", "libflagtest", "libgmock", "libosi", "server_configurable_flags", ], header_libs: ["libbluetooth_headers"], }
system/device/src/device_iot_config.cc +0 −69 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include "device/include/device_iot_config.h" #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <ctype.h> #include <string.h> #include <time.h> Loading Loading @@ -49,10 +48,6 @@ alarm_t* config_timer; using namespace bluetooth; bool device_iot_config_has_section(const std::string& section) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -60,10 +55,6 @@ bool device_iot_config_has_section(const std::string& section) { } bool device_iot_config_exist(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -71,10 +62,6 @@ bool device_iot_config_exist(const std::string& section, const std::string& key) } bool device_iot_config_get_int(const std::string& section, const std::string& key, int& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -87,10 +74,6 @@ bool device_iot_config_get_int(const std::string& section, const std::string& ke } bool device_iot_config_set_int(const std::string& section, const std::string& key, int value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -107,10 +90,6 @@ bool device_iot_config_set_int(const std::string& section, const std::string& ke } bool device_iot_config_int_add_one(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); int result = 0; Loading @@ -128,10 +107,6 @@ bool device_iot_config_int_add_one(const std::string& section, const std::string } bool device_iot_config_get_hex(const std::string& section, const std::string& key, int& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading Loading @@ -159,10 +134,6 @@ bool device_iot_config_get_hex(const std::string& section, const std::string& ke bool device_iot_config_set_hex(const std::string& section, const std::string& key, int value, int byte_num) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); char value_str[32] = {0}; Loading @@ -189,10 +160,6 @@ bool device_iot_config_set_hex(const std::string& section, const std::string& ke bool device_iot_config_set_hex_if_greater(const std::string& section, const std::string& key, int value, int byte_num) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } int stored_value = 0; bool ret = device_iot_config_get_hex(section, key, stored_value); if (ret && stored_value >= value) { Loading @@ -204,10 +171,6 @@ bool device_iot_config_set_hex_if_greater(const std::string& section, const std: bool device_iot_config_get_str(const std::string& section, const std::string& key, char* value, int* size_bytes) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(value != NULL, "assert failed: value != NULL"); log::assert_that(size_bytes != NULL, "assert failed: size_bytes != NULL"); Loading @@ -227,10 +190,6 @@ bool device_iot_config_get_str(const std::string& section, const std::string& ke bool device_iot_config_set_str(const std::string& section, const std::string& key, const std::string& value) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -246,10 +205,6 @@ bool device_iot_config_set_str(const std::string& section, const std::string& ke bool device_iot_config_get_bin(const std::string& section, const std::string& key, uint8_t* value, size_t* length) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(value != NULL, "assert failed: value != NULL"); log::assert_that(length != NULL, "assert failed: length != NULL"); Loading Loading @@ -293,10 +248,6 @@ bool device_iot_config_get_bin(const std::string& section, const std::string& ke } size_t device_iot_config_get_bin_length(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return 0; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -312,10 +263,6 @@ size_t device_iot_config_get_bin_length(const std::string& section, const std::s bool device_iot_config_set_bin(const std::string& section, const std::string& key, const uint8_t* value, size_t length) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } const char* lookup = "0123456789abcdef"; log::assert_that(config != NULL, "assert failed: config != NULL"); Loading Loading @@ -350,10 +297,6 @@ bool device_iot_config_set_bin(const std::string& section, const std::string& ke } bool device_iot_config_remove(const std::string& section, const std::string& key) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return false; } log::assert_that(config != NULL, "assert failed: config != NULL"); std::unique_lock<std::mutex> lock(config_lock); Loading @@ -361,10 +304,6 @@ bool device_iot_config_remove(const std::string& section, const std::string& key } void device_iot_config_flush(void) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(config_timer != NULL, "assert failed: config_timer != NULL"); Loading @@ -376,10 +315,6 @@ void device_iot_config_flush(void) { } bool device_iot_config_clear(void) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return true; } log::assert_that(config != NULL, "assert failed: config != NULL"); log::assert_that(config_timer != NULL, "assert failed: config_timer != NULL"); Loading @@ -400,10 +335,6 @@ bool device_iot_config_clear(void) { } void device_debug_iot_config_dump(int fd) { if (!com::android::bluetooth::flags::device_iot_config_logging()) { return; } dprintf(fd, "\nBluetooth Iot Config:\n"); dprintf(fd, " Config Source: "); Loading