From 9cb522b16c9d8257d85cc6c1ac7d5ae554da411f Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Mon, 15 May 2023 11:38:23 +0900 Subject: [PATCH] Add tethering native flag namespace to sDeviceConfigScopes DeviceConfig was moved to the module and adding new namespace requires API change but API is already frozen. So this CL defines namespace constant in SettingsToPropertiesMapper. This constant needs to be moved to DeviceConfig module (b/282593625) Bug: 281944942 Test: adb shell device_config put tethering_u_or_later_native test 1 Test: Read persist.device_config.tethering_u_or_later_native.test property Test: from system server and Tethering.apk Change-Id: I6d275f3943c14c65b05d81e3049b4757d9063806 --- .../com/android/server/am/SettingsToPropertiesMapper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java index 8c227f5488d35..9db9e77c82c9e 100644 --- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java +++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java @@ -72,6 +72,10 @@ public class SettingsToPropertiesMapper { Settings.Global.NATIVE_FLAGS_HEALTH_CHECK_ENABLED, }; + // TODO(b/282593625): Move this constant to DeviceConfig module + private static final String NAMESPACE_TETHERING_U_OR_LATER_NATIVE = + "tethering_u_or_later_native"; + // All the flags under the listed DeviceConfig scopes will be synced to native level. // // NOTE: please grant write permission system property prefix @@ -106,7 +110,8 @@ public class SettingsToPropertiesMapper { DeviceConfig.NAMESPACE_WINDOW_MANAGER_NATIVE_BOOT, DeviceConfig.NAMESPACE_MEMORY_SAFETY_NATIVE_BOOT, DeviceConfig.NAMESPACE_MEMORY_SAFETY_NATIVE, - DeviceConfig.NAMESPACE_HDMI_CONTROL + DeviceConfig.NAMESPACE_HDMI_CONTROL, + NAMESPACE_TETHERING_U_OR_LATER_NATIVE }; private final String[] mGlobalSettings;