Add UnsupportedAppUsage annotation to core platform and intra core apis

Needed for conscrypt, bouncycastle and other consumers of the two APIs.

There appears to be a bug in metalava (http://b/119398397) as the
UnsupportedAppUsage methods are not listed in the .txt files even
though they are annotated with @CorePlatformApi and @IntraCoreApi. They
are present in the stubs though.

Bug: 117818301
Bug: 119398397
Test: make checkbuild
Change-Id: I53c7ff712653aa6102cb24d5655dc0b9b60660e1
diff --git a/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java b/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
index 75a5533..793a2ab 100644
--- a/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
+++ b/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
@@ -23,6 +23,8 @@
 import dalvik.system.VMRuntime;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import libcore.api.CorePlatformApi;
+import libcore.api.IntraCoreApi;
 
 /**
  * Indicates that a class member, that is not part of the SDK, is used by apps.
@@ -42,19 +44,31 @@
  */
 @Retention(CLASS)
 @Target({CONSTRUCTOR, METHOD, FIELD})
+@CorePlatformApi
+@IntraCoreApi
 public @interface UnsupportedAppUsage {
 
+    @CorePlatformApi
+    @IntraCoreApi
     class VERSION_CODES {
         /**
          * Magic version number for a current development build, which has
          * not yet turned into an official release.
          */
+        @CorePlatformApi
+        @IntraCoreApi
         public static final int CUR_DEVELOPMENT = VMRuntime.SDK_VERSION_CUR_DEVELOPMENT;
 
+        @CorePlatformApi
+        @IntraCoreApi
         public static final int O = 26;
 
+        @CorePlatformApi
+        @IntraCoreApi
         public static final int P = 28;
 
+        @CorePlatformApi
+        @IntraCoreApi
         public static final int Q = CUR_DEVELOPMENT;
     }
 
@@ -63,6 +77,8 @@
      *
      * @return ID of the associated tracking bug
      */
+    @CorePlatformApi
+    @IntraCoreApi
     long trackingBug() default 0;
 
     /**
@@ -96,6 +112,8 @@
      *
      * @return The maximum value for an apps targetSdkVersion in order to access this API.
      */
+    @CorePlatformApi
+    @IntraCoreApi
     int maxTargetSdk() default Integer.MAX_VALUE;
 
     /**
@@ -104,5 +122,7 @@
      *
      * @return A dex API signature.
      */
+    @CorePlatformApi
+    @IntraCoreApi
     String expectedSignature() default "";
 }
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
index 54129e4..626873e 100644
--- a/mmodules/core_platform_api/api/platform/current-api.txt
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
@@ -560,6 +560,21 @@
 
 }
 
+package dalvik.annotation.compat {
+
+  public abstract class UnsupportedAppUsage implements java.lang.annotation.Annotation {
+  }
+
+  public static class UnsupportedAppUsage.VERSION_CODES {
+    ctor public UnsupportedAppUsage.VERSION_CODES();
+    field public static final int CUR_DEVELOPMENT = 10000; // 0x2710
+    field public static final int O = 26; // 0x1a
+    field public static final int P = 28; // 0x1c
+    field public static final int Q = 10000; // 0x2710
+  }
+
+}
+
 package dalvik.annotation.optimization {
 
   public abstract class CriticalNative implements java.lang.annotation.Annotation {
@@ -586,7 +601,7 @@
   }
 
   public static abstract interface BaseDexClassLoader.Reporter {
-    method public abstract void report(java.util.List<dalvik.system.BaseDexClassLoader>, java.util.List<java.lang.String>);
+    method public abstract void report(java.util.List<java.lang.ClassLoader>, java.util.List<java.lang.String>);
   }
 
   public final class BlockGuard {
diff --git a/mmodules/intracoreapi/api/intra/current-api.txt b/mmodules/intracoreapi/api/intra/current-api.txt
index 80c924d..ce23292 100644
--- a/mmodules/intracoreapi/api/intra/current-api.txt
+++ b/mmodules/intracoreapi/api/intra/current-api.txt
@@ -415,6 +415,21 @@
 
 }
 
+package dalvik.annotation.compat {
+
+  public abstract class UnsupportedAppUsage implements java.lang.annotation.Annotation {
+  }
+
+  public static class UnsupportedAppUsage.VERSION_CODES {
+    ctor public UnsupportedAppUsage.VERSION_CODES();
+    field public static final int CUR_DEVELOPMENT = 10000; // 0x2710
+    field public static final int O = 26; // 0x1a
+    field public static final int P = 28; // 0x1c
+    field public static final int Q = 10000; // 0x2710
+  }
+
+}
+
 package dalvik.system {
 
   public final class BlockGuard {