From 99ec7396f4d3cc06faa46fde825cb33c20b5840d Mon Sep 17 00:00:00 2001 From: Hsin-chen Chuang Date: Thu, 2 May 2024 17:50:37 +0800 Subject: floss: Complete libflags shim On Floss we store the aflags config inside sysprops module. Bug: 307006275 Tag: #floss Test: mmm packages/modules/Bluetooth Test: atest --host bluetooth_test_gd_unit:ConfigCacheTest#test_get_section_property_names Test: atest --host bluetooth_test_gd_unit:SyspropsModuleTest Test: manual set/reset/remove persist.device_config.aconfig_flags.bluetooth.com.android.bluetooth.flags.msft_addr_tracking_quirk, verified behavior changed Flag: EXEMPT, Floss-only changes Change-Id: I1d72b7e970d354a6b8c22e6e015d859bd1b48da7 --- floss/libflags/get_flags.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'floss') diff --git a/floss/libflags/get_flags.cc b/floss/libflags/get_flags.cc index d7152e2edb..233662ac6d 100644 --- a/floss/libflags/get_flags.cc +++ b/floss/libflags/get_flags.cc @@ -16,11 +16,15 @@ #include "server_configurable_flags/get_flags.h" +#include "gd/os/system_properties.h" + namespace server_configurable_flags { std::string GetServerConfigurableFlag( const std::string& experiment_category_name, const std::string& experiment_flag_name, const std::string& default_value) { - return default_value; + std::string prop_name = "persist.device_config." + experiment_category_name + + "." + experiment_flag_name; + return bluetooth::os::GetSystemProperty(prop_name).value_or(default_value); } } // namespace server_configurable_flags -- cgit v1.2.3-59-g8ed1b