Files
build/tools/aconfig/templates/FeatureFlags.java.template
Zhi Dou deafa792eb aconfig: flag java lib enable optimization
This change adds annotation in the generated code. If the flag is read
only, annotations @com.android.aconfig.annotations.AssumeTrueForR8 or
@com.android.aconfig.annotations.AssumeFalseForR8 will be added in to
the corresponding methods in the interface FeatureFlags, and class
Flags.

Test: atest aconfig aconfig.test.java
Bug: 295328116
Change-Id: Ic1b62a86f0945a5e72ae2c4987cce77fe3f172e9
2023-09-06 12:55:09 +00:00

15 lines
346 B
Plaintext

package {package_name};
public interface FeatureFlags \{
{{ 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 }}
boolean {item.method_name}();
{{ endfor }}
}