Escalate to error for code annotated with @Disabled, @EnabledAfter.

Disabled and EnabledAfter together are confusing.

Test: atest compat-changeid-annotation-processor-test
Bug: 136077441
Change-Id: I4da75a1f8bc862306d6a0c3cf094a69c2ffe7cc9
diff --git a/annotation/processors/changeid/src/java/com/android/compat/annotation/ChangeIdProcessor.java b/annotation/processors/changeid/src/java/com/android/compat/annotation/ChangeIdProcessor.java
index 5c64edf..4ba284a 100644
--- a/annotation/processors/changeid/src/java/com/android/compat/annotation/ChangeIdProcessor.java
+++ b/annotation/processors/changeid/src/java/com/android/compat/annotation/ChangeIdProcessor.java
@@ -17,8 +17,6 @@
 package com.android.compat.annotation;
 
 import static javax.tools.Diagnostic.Kind.ERROR;
-import static javax.tools.Diagnostic.Kind.WARNING;
-
 
 import com.google.common.collect.ImmutableSet;
 
@@ -196,9 +194,8 @@
 
         if (disabled && enabledAfter != null) {
             messager.printMessage(
-                    WARNING,
-                    "ChangeId is annotated with both @Disabled and @EnabledAfter. @EnabledAfter "
-                            + "will have no effect.",
+                    ERROR,
+                    "ChangeId cannot be annotated with both @Disabled and @EnabledAfter.",
                     e);
         }
         return new Change(id, name, disabled, enabledAfter);
diff --git a/annotation/processors/changeid/test/src/com/android/compat/annotation/ChangeIdProcessorTest.java b/annotation/processors/changeid/test/src/com/android/compat/annotation/ChangeIdProcessorTest.java
index bec0e6f..faa89b1 100644
--- a/annotation/processors/changeid/test/src/com/android/compat/annotation/ChangeIdProcessorTest.java
+++ b/annotation/processors/changeid/test/src/com/android/compat/annotation/ChangeIdProcessorTest.java
@@ -130,13 +130,9 @@
         Compilation compilation =
                 Compiler.javac()
                         .withProcessors(new ChangeIdProcessor())
-                        .compile(ObjectArrays.concat(mAnnotations,source, JavaFileObject.class));
-        CompilationSubject.assertThat(compilation).succeeded();
-        CompilationSubject.assertThat(compilation).generatedFile(CLASS_OUTPUT, "compat",
-                "compat_config.xml").hasContents(ByteSource.wrap(expectedFile.getBytes(UTF_8)));
-        CompilationSubject.assertThat(compilation).hadWarningContaining(
-                "ChangeId is annotated with both @Disabled and @EnabledAfter. @EnabledAfter will "
-                        + "have no effect.");
+                        .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class));
+        CompilationSubject.assertThat(compilation).hadErrorContaining(
+                "ChangeId cannot be annotated with both @Disabled and @EnabledAfter.");
     }
 
     @Test