Before this change java codegen filter flags for exported mode in the template. This change move the filter process to commands as other codegen. Thus the codegen code will only generate code based on the passed in flags. Bug: 311152507 Test: atest aconfig.test aconfig.test.java AconfigJavaHostTest Change-Id: I74045709cde19e6c687c3eb0d94050ea40cf5042
24 lines
622 B
Plaintext
24 lines
622 B
Plaintext
package {package_name};
|
|
// TODO(b/303773055): Remove the annotation after access issue is resolved.
|
|
import android.compat.annotation.UnsupportedAppUsage;
|
|
|
|
/** @hide */
|
|
public interface FeatureFlags \{
|
|
{{ for item in flag_elements }}
|
|
{{ if library_exported }}
|
|
@UnsupportedAppUsage
|
|
boolean {item.method_name}();
|
|
{{ else }}
|
|
{{ -if not item.is_read_write }}
|
|
{{ -if item.default_value }}
|
|
@com.android.aconfig.annotations.AssumeTrueForR8
|
|
{{ -else }}
|
|
@com.android.aconfig.annotations.AssumeFalseForR8
|
|
{{ -endif- }}
|
|
{{ endif }}
|
|
@UnsupportedAppUsage
|
|
boolean {item.method_name}();
|
|
{{ endif }}
|
|
{{ endfor }}
|
|
}
|