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/FeatureFlags.java.template b/tools/aconfig/templates/FeatureFlags.java.template
index 9350d60..02305e6 100644
--- a/tools/aconfig/templates/FeatureFlags.java.template
+++ b/tools/aconfig/templates/FeatureFlags.java.template
@@ -1,4 +1,6 @@
 package {package_name};
+// TODO(b/303773055): Remove the annotation after access issue is resolved.
+import android.compat.annotation.UnsupportedAppUsage;
 
 /** @hide */
 public interface FeatureFlags \{
@@ -10,6 +12,7 @@
     @com.android.aconfig.annotations.AssumeFalseForR8
 {{ -endif- }}
 {{ endif }}
+    @UnsupportedAppUsage
     boolean {item.method_name}();
 {{ endfor }}
 }