commit | 22a90f4f10a39a64ad785fa5444fc396d4e9d8e2 | [log] [tgz] |
---|---|---|
author | Zhi Dou <zhidou@google.com> | Fri Oct 06 07:28:44 2023 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Tue Oct 10 13:55:06 2023 +0000 |
tree | a12c9278ca9b3b696fb0611cabd0904d2828ffe7 | |
parent | e52ce13e82fcb0fba1574e54704e992021469d2e [diff] [blame] |
aconfig: add @UnsupportedAppUsage to methods in generated flags The java generated flags are marked as @hide which breaks CTS. To unblock CTS test add @UnsupportedAppUsage to expose the methods. Test: atest aconfig.test.flags Bug: 301272559 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:64ad75f50ae96f9a8b57a9e8f88ae9a53d3c1044) Merged-In: I897573c054e70fc6e093869ba6d416c38f81e28f Change-Id: I897573c054e70fc6e093869ba6d416c38f81e28f
diff --git a/tools/aconfig/templates/Flags.java.template b/tools/aconfig/templates/Flags.java.template index 39024a8..66c4c5a 100644 --- a/tools/aconfig/templates/Flags.java.template +++ b/tools/aconfig/templates/Flags.java.template
@@ -1,5 +1,8 @@ package {package_name}; +// TODO(b/303773055): Remove the annotation after access issue is resolved. +import android.compat.annotation.UnsupportedAppUsage; + /** @hide */ public final class Flags \{ {{- for item in class_elements}} @@ -14,6 +17,7 @@ @com.android.aconfig.annotations.AssumeFalseForR8 {{ -endif- }} {{ endif }} + @UnsupportedAppUsage public static boolean {item.method_name}() \{ return FEATURE_FLAGS.{item.method_name}(); }