Loading tools/aconfig/aconfig/src/codegen/java.rs +9 −4 Original line number Diff line number Diff line Loading @@ -698,6 +698,8 @@ mod tests { StorageInternalReader reader; boolean readFromNewStorage; boolean useNewStorageValueAndDiscardOld = false; private final static String TAG = "AconfigJavaCodegen"; private final static String SUCCESS_LOG = "success: %s value matches"; private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s"; Loading @@ -713,6 +715,9 @@ mod tests { reader = null; } } useNewStorageValueAndDiscardOld = DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false); } private void load_overrides_aconfig_test() { Loading Loading @@ -746,7 +751,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRw", val, disabledRw)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRw = val; } Loading @@ -757,7 +762,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwExported", val, disabledRwExported)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRwExported = val; } Loading @@ -768,7 +773,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "enabledRw", val, enabledRw)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { enabledRw = val; } Loading Loading @@ -805,7 +810,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwInOtherNamespace", val, disabledRwInOtherNamespace)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRwInOtherNamespace = val; } Loading tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template +6 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ StorageInternalReader reader; boolean readFromNewStorage; boolean useNewStorageValueAndDiscardOld = false; private final static String TAG = "AconfigJavaCodegen"; private final static String SUCCESS_LOG = "success: %s value matches"; private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s"; Loading @@ -50,6 +52,9 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ reader = null; } } useNewStorageValueAndDiscardOld = DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false); } {{ -endif }} Loading Loading @@ -91,7 +96,7 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ Log.i(TAG, String.format(MISMATCH_LOG, "{flag.method_name}", val, {flag.method_name})); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) \{ if (useNewStorageValueAndDiscardOld) \{ {flag.method_name} = val; } Loading Loading
tools/aconfig/aconfig/src/codegen/java.rs +9 −4 Original line number Diff line number Diff line Loading @@ -698,6 +698,8 @@ mod tests { StorageInternalReader reader; boolean readFromNewStorage; boolean useNewStorageValueAndDiscardOld = false; private final static String TAG = "AconfigJavaCodegen"; private final static String SUCCESS_LOG = "success: %s value matches"; private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s"; Loading @@ -713,6 +715,9 @@ mod tests { reader = null; } } useNewStorageValueAndDiscardOld = DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false); } private void load_overrides_aconfig_test() { Loading Loading @@ -746,7 +751,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRw", val, disabledRw)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRw = val; } Loading @@ -757,7 +762,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwExported", val, disabledRwExported)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRwExported = val; } Loading @@ -768,7 +773,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "enabledRw", val, enabledRw)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { enabledRw = val; } Loading Loading @@ -805,7 +810,7 @@ mod tests { Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwInOtherNamespace", val, disabledRwInOtherNamespace)); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) { if (useNewStorageValueAndDiscardOld) { disabledRwInOtherNamespace = val; } Loading
tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template +6 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ StorageInternalReader reader; boolean readFromNewStorage; boolean useNewStorageValueAndDiscardOld = false; private final static String TAG = "AconfigJavaCodegen"; private final static String SUCCESS_LOG = "success: %s value matches"; private final static String MISMATCH_LOG = "error: %s value mismatch, new storage value is %s, old storage value is %s"; Loading @@ -50,6 +52,9 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ reader = null; } } useNewStorageValueAndDiscardOld = DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false); } {{ -endif }} Loading Loading @@ -91,7 +96,7 @@ public final class FeatureFlagsImpl implements FeatureFlags \{ Log.i(TAG, String.format(MISMATCH_LOG, "{flag.method_name}", val, {flag.method_name})); } if (DeviceConfig.getBoolean("core_experiments_team_internal", "com.android.providers.settings.use_new_storage_value", false)) \{ if (useNewStorageValueAndDiscardOld) \{ {flag.method_name} = val; } Loading