This reverts commit 379e09d157
.
Reason for revert: Seems to have broken the build. Reverting while investigating.
Change-Id: I37c9a065853ef07b1f1c18355205a2f49dd816c4
31 lines
916 B
Plaintext
31 lines
916 B
Plaintext
package {package_name};
|
|
|
|
public final class Flags \{
|
|
{{- for item in class_elements}}
|
|
public static final String FLAG_{item.flag_name_constant_suffix} = "{item.device_config_flag}";
|
|
{{- endfor }}
|
|
{{ for item in class_elements}}
|
|
{{ -if not item.is_read_write }}
|
|
{{ -if item.default_value }}
|
|
@com.android.aconfig.annotations.AssumeTrueForR8
|
|
{{ -else }}
|
|
@com.android.aconfig.annotations.AssumeFalseForR8
|
|
{{ -endif- }}
|
|
{{ endif }}
|
|
public static boolean {item.method_name}() \{
|
|
return FEATURE_FLAGS.{item.method_name}();
|
|
}
|
|
{{ endfor }}
|
|
{{ -if is_test_mode }}
|
|
public static void setFeatureFlags(FeatureFlags featureFlags) \{
|
|
Flags.FEATURE_FLAGS = featureFlags;
|
|
}
|
|
|
|
public static void unsetFeatureFlags() \{
|
|
Flags.FEATURE_FLAGS = null;
|
|
}
|
|
{{ endif }}
|
|
private static FeatureFlags FEATURE_FLAGS{{ -if not is_test_mode }} = new FeatureFlagsImpl(){{ -endif- }};
|
|
|
|
}
|