Change the java template to remove the extra new lines and spaces in generated java code. Bug: 280833463 Test: atest aconfig.test Change-Id: I336050540f8a2b0966bf21cf6e034a8fa701458e
24 lines
716 B
Plaintext
24 lines
716 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}}
|
|
public static boolean {item.method_name}() \{
|
|
return FEATURE_FLAGS.{item.method_name}();
|
|
}
|
|
{{ endfor }}
|
|
{{ -if is_test_mode }}
|
|
public static void setFeatureFlagsImpl(FeatureFlags featureFlags) \{
|
|
Flags.FEATURE_FLAGS = featureFlags;
|
|
}
|
|
|
|
public static void unsetFeatureFlagsImpl() \{
|
|
Flags.FEATURE_FLAGS = null;
|
|
}
|
|
{{ endif}}
|
|
private static FeatureFlags FEATURE_FLAGS{{ -if not is_test_mode }} = new FeatureFlagsImpl(){{ -endif- }};
|
|
|
|
}
|