Merge "Improve error messages to encourage use of @EnableFlags and @DisableFlags" into main
diff --git a/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java b/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java
index 57b4664..38fcbb5 100644
--- a/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java
+++ b/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java
@@ -147,7 +147,10 @@
      *
      * @param fullFlagNames The name of the flags in the flag class with the format
      *     {packageName}.{flagName}
+     *
+     * @deprecated Annotate your test or class with <code>@EnableFlags(String...)</code> instead
      */
+    @Deprecated
     public void enableFlags(String... fullFlagNames) {
         if (!mIsRuleEvaluating) {
             throw new IllegalStateException("Not allowed to set flags outside test and setup code");
@@ -165,7 +168,10 @@
      *
      * @param fullFlagNames The name of the flags in the flag class with the format
      *     {packageName}.{flagName}
+     *
+     * @deprecated Annotate your test or class with <code>@DisableFlags(String...)</code> instead
      */
+    @Deprecated
     public void disableFlags(String... fullFlagNames) {
         if (!mIsRuleEvaluating) {
             throw new IllegalStateException("Not allowed to set flags outside test and setup code");