Merge "Add missing nullability annotations to java.lang."
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 1f312a6..84405eb 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -13,9 +13,14 @@
 // limitations under the License.
 
 //
-// Definitions for building the Java library and associated tests.
+// Definitions for building the Android core library and associated tests.
 //
 
+// The Android core library provides low-level APIs for use by the rest of the
+// Android software stack. It is made up of various parts, some of which can be
+// found in libcore/ and other parts that can be found in various external/
+// directories. See the "core-system-modules" definition for the parts.
+
 // libcore has some sub-directories that follow a common structure:
 // e.g. dalvik, dom, harmony-tests, json, jsr166-tests, luni, libart, ojluni,
 // support, xml, xmlpull.
@@ -77,12 +82,14 @@
     ],
 }
 
-// The set of files in core that have been marked up with @hide and API-related
-// annotations. Note that this includes the intra-core and core-platform APIs as
-// well as the public APIs. Some source files in :openjdk_mmodule_extra_files
-// are annotated by applying annotation to the .annotated.java stubs files in
-// ojluni/annotated/mmodules and rather than in the original source. See the
-// comments in openjdk_java_files.bp for more details.
+// The set of files for the core library that have been marked up with @hide and
+// API-related annotations. Note that this includes the intra-core and
+// core-platform APIs as well as the public APIs.
+//
+// Some source files in :openjdk_mmodule_extra_files are annotated by applying
+// annotations to the .annotated.java stubs files in ojluni/annotated/mmodules
+// and rather than in the original source. See the comments in
+// openjdk_java_files.bp for more details.
 filegroup {
     name: "core_api_files",
     srcs: [
@@ -127,6 +134,8 @@
     system_modules: "none",
 }
 
+// A target used to bootstrap compilation for the core library.
+// See core-all-system-modules for more details.
 java_library {
     name: "core-all",
     defaults: ["libcore_java_defaults"],
@@ -156,11 +165,22 @@
     installable: false,
 }
 
+// A system modules definition for use by core library targets only. It only
+// contains the core-all jar, which contains the classes that end up in core-oj,
+// core-libart as well as the lambda stubs needed to compile Java lambda code.
+// It does not contain other parts of core library like conscrypt, bouncycastle,
+// etc. This system_modules definition is used to bootstrap compilation for
+// other parts of the core library like core-oj, core-libart, conscrypt,
+// bouncycastle, etc.
+//
+// If you want to compile against the entire core library implementation, for
+// example to build core library tests, see "core-system-modules" instead.
 java_system_modules {
     name: "core-all-system-modules",
     libs: ["core-all"],
 }
 
+// Contains the parts of core library associated with OpenJDK.
 java_library {
     name: "core-oj",
     defaults: ["libcore_java_defaults"],
@@ -203,7 +223,9 @@
 
 }
 
-// Definitions to make the core library.
+// Contains parts of core library not associated with OpenJDK. Contains not
+// just java.*, javax.* code but also android.icu.*, android.system.* and
+// various internal libcore.* packages.
 java_library {
     name: "core-libart",
     defaults: ["libcore_java_defaults"],
@@ -233,9 +255,13 @@
     ],
 }
 
-// A guaranteed unstripped version of core-oj and core-libart.
+//
+// Guaranteed unstripped versions of core-oj and core-libart.
+//
 // The build system may or may not strip the core-oj and core-libart jars,
 // but these will not be stripped. See b/24535627.
+//
+
 java_library {
     name: "core-oj-testdex",
     installable: true,
@@ -272,8 +298,8 @@
     ],
 }
 
-// A library that exists to satisfy javac when
-// compiling source code that contains lambdas.
+// Creates a jar that exists to satisfy javac when compiling source code that
+// contains lambdas.
 java_library {
     name: "core-lambda-stubs",
     defaults: ["libcore_java_defaults"],
@@ -297,23 +323,34 @@
     include_srcs: true,
 }
 
-// The libraries that make up core.
+// A system modules definition containing the implementations for the various
+// parts that make up the core library.
+//
+// This system module is intended for use by tests that may need access to
+// core library internals. It should not be generally used; most of the
+// platform build should build against API stubs instead. See
+// "core-platform-api-stubs-system-modules", which is the default used by the
+// Android build.
+//
+// This module also includes lambda stubs for compiling source containing
+// Java lambdas.
 java_system_modules {
     name: "core-system-modules",
     libs: [
         "core-oj",
         "core-libart",
         "core-simple",
-        // This one is not on device but it's needed when javac compiles code
-        // containing lambdas.
-        "core-lambda-stubs",
         "bouncycastle",
         "conscrypt",
         "okhttp",
+        "apache-xml",
+        // This one is not on device but it's needed when javac compiles code
+        // containing lambdas.
+        "core-lambda-stubs",
     ],
 }
 
-// Build libcore test rules
+// Builds libcore test rules
 java_library_static {
     name: "core-test-rules",
     hostdex: true,
@@ -328,16 +365,14 @@
     system_modules: "core-all-system-modules",
 }
 
-// Make the core-tests-support library.
+// Builds the core-tests-support library used by various tests.
 java_library_static {
     name: "core-tests-support",
     hostdex: true,
     srcs: ["support/src/test/java/**/*.java"],
 
-    sdk_version: "core_platform_current",
-    libs: [
-        "junit",
-    ],
+    no_framework_libs: true,
+    libs: ["junit"],
     static_libs: [
         "bouncycastle-unbundled",
         "bouncycastle-bcpkix-unbundled",
@@ -345,7 +380,7 @@
     ],
 }
 
-// Make the jsr166-tests library.
+// Builds the jsr166-tests library.
 java_test {
     name: "jsr166-tests",
     srcs: ["jsr166-tests/src/test/java/**/*.java"],
@@ -357,7 +392,8 @@
     system_modules: "core-all-system-modules",
 }
 
-// Build a library just containing files from luni/src/test/filesystems for use in tests.
+// Builds a library just containing files from luni/src/test/filesystems
+// for use in tests.
 java_library {
     name: "filesystemstest",
     compile_dex: true,
@@ -369,7 +405,8 @@
     },
 }
 
-// Build a library just containing files from luni/src/test/parameter_metadata for use in tests.
+// Builds a library just containing files from luni/src/test/parameter_metadata
+// for use in tests.
 java_library {
     name: "parameter-metadata-test",
     compile_dex: true,
@@ -381,7 +418,7 @@
     },
 }
 
-// Make the core-tests library.
+// Builds the core-tests library.
 java_test {
     name: "core-tests",
     defaults: ["libcore_java_defaults"],
@@ -446,7 +483,7 @@
     test_config: "AndroidTest-core-tests.xml",
 }
 
-// Make the core-ojtests library.
+// Builds the core-ojtests library that contains test code from OpenJDK.
 java_test {
     name: "core-ojtests",
     defaults: ["libcore_java_defaults"],
@@ -487,7 +524,8 @@
     patch_module: "java.base",
 }
 
-// Make the core-ojtests-public library. Excludes any private API tests.
+// Builds the core-ojtests-public library. Excludes any private API tests.
+// Like core-ojtests but smaller.
 java_test {
     name: "core-ojtests-public",
     defaults: ["libcore_java_defaults"],
@@ -521,11 +559,16 @@
     system_modules: "core-all-system-modules",
 }
 
-// Make the annotated stubs in ojluni/annotations available to metalava:
+// Exports annotated stubs source files in ojluni/annotations/sdk to make them
+// available to metalava. Used for nullability annotations in OpenJDK source.
 droiddoc_exported_dir {
     name: "ojluni-annotated-sdk-stubs",
     path: "ojluni/annotations/sdk",
 }
+
+// Exports annotated stubs source files in ojluni/annotations/mmodules to make
+// them available to metalava. Used for core platform API and intra-code API
+// annotations in OpenJDK source.
 droiddoc_exported_dir {
     name: "ojluni-annotated-mmodule-stubs",
     path: "ojluni/annotations/mmodule",
@@ -540,7 +583,8 @@
     ],
 }
 
-// Stubs for the parts of the public SDK API provided by the core libraries.
+// Generates stubs for the parts of the public SDK API provided by the core
+// library.
 droidstubs {
     name: "core-current-stubs-gen",
     srcs: [":core_api_files"],
@@ -551,7 +595,9 @@
     merge_inclusion_annotations_dirs: ["ojluni-annotated-mmodule-stubs"],
 }
 
-// A library containing the parts of the public SDK API provided by the core libraries.
+// A stubs target containing the parts of the public SDK API provided by the
+// core library.
+//
 // Don't use this directly, use "sdk_version: core_current".
 java_library {
     name: "core.current.stubs",
diff --git a/benchmarks/src/benchmarks/GetInstancesOfClassesBenchmark.java b/benchmarks/src/benchmarks/GetInstancesOfClassesBenchmark.java
deleted file mode 100644
index 2e85fae..0000000
--- a/benchmarks/src/benchmarks/GetInstancesOfClassesBenchmark.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2017 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package benchmarks;
-
-import dalvik.system.VMDebug;
-
-public class GetInstancesOfClassesBenchmark {
-    private static class ObjectTree {
-        ObjectTree left;
-        ObjectTree right;
-
-        public ObjectTree(int depth) {
-            if (depth > 1) {
-                left = new ObjectTree(depth - 1);
-                right = new ObjectTree(depth - 1);
-            }
-        }
-    }
-
-    // 2^19 = 524288
-    private static ObjectTree tree = new ObjectTree(19);
-
-    public void timeGetInstancesOf1Class(int reps) {
-        Class[] classes = new Class[]{
-            Integer.class
-        };
-        for (int rep = 0; rep < reps; ++rep) {
-            VMDebug.getInstancesOfClasses(classes, true);
-        }
-    }
-
-    public void timeGetInstancesOf2Classes(int reps) {
-        Class[] classes = new Class[]{
-            Integer.class,
-            Long.class
-        };
-        for (int rep = 0; rep < reps; ++rep) {
-            VMDebug.getInstancesOfClasses(classes, true);
-        }
-    }
-
-    public void timeGetInstancesOf4Classes(int reps) {
-        Class[] classes = new Class[]{
-            Integer.class,
-            Long.class,
-            Float.class,
-            Double.class
-        };
-        for (int rep = 0; rep < reps; ++rep) {
-            VMDebug.getInstancesOfClasses(classes, true);
-        }
-    }
-}
diff --git a/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java b/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java
deleted file mode 100644
index 3cde240..0000000
--- a/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package benchmarks.regression;
-
-import android.icu.util.TimeZone;
-import android.icu.util.ULocale;
-import libcore.icu.DateIntervalFormat;
-
-import static libcore.icu.DateUtilsBridge.*;
-
-public class DateIntervalFormatBenchmark {
-  public void timeDateIntervalFormat_formatDateRange_DATE(int reps) throws Exception {
-    ULocale l = ULocale.US;
-    TimeZone utc = TimeZone.getTimeZone("UTC");
-    int flags = FORMAT_SHOW_DATE | FORMAT_SHOW_WEEKDAY;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
-    }
-  }
-
-  public void timeDateIntervalFormat_formatDateRange_TIME(int reps) throws Exception {
-    ULocale l = ULocale.US;
-    TimeZone utc = TimeZone.getTimeZone("UTC");
-    int flags = FORMAT_SHOW_TIME | FORMAT_24HOUR;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
-    }
-  }
-
-  public void timeDateIntervalFormat_formatDateRange_DATE_TIME(int reps) throws Exception {
-    ULocale l = ULocale.US;
-    TimeZone utc = TimeZone.getTimeZone("UTC");
-    int flags = FORMAT_SHOW_DATE | FORMAT_SHOW_WEEKDAY | FORMAT_SHOW_TIME | FORMAT_24HOUR;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
-    }
-  }
-}
diff --git a/benchmarks/src/benchmarks/regression/IcuBenchmark.java b/benchmarks/src/benchmarks/regression/IcuBenchmark.java
deleted file mode 100644
index 47661b8..0000000
--- a/benchmarks/src/benchmarks/regression/IcuBenchmark.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package benchmarks.regression;
-
-import java.util.Locale;
-import libcore.icu.ICU;
-
-public class IcuBenchmark {
-
-    private static final String ASCII_LOWERCASE = makeUnicodeRange(97, 122);
-    private static final String ASCII_UPPERCASE = makeUnicodeRange(65, 90);
-
-    private static final String LAT_1_SUPPLEMENT = makeUnicodeRange(0xC0, 0xFF);
-    private static final String LAT_EXTENDED_A = makeUnicodeRange(0x100, 0x17F);
-    private static final String LAT_EXTENDED_B = makeUnicodeRange(0x180, 0x24F);
-
-    private static final Locale CZECH_LOCALE = Locale.forLanguageTag("cs-CZ");
-    private static final Locale PINYIN_LOCALE = Locale.forLanguageTag("zh-Latn");
-
-    public static String makeUnicodeRange(int startingCodePoint, int endingCodePoint) {
-        char[] tmp = new char[endingCodePoint - startingCodePoint + 1];
-        for (int i = startingCodePoint; i <= endingCodePoint; i++) {
-            tmp[i - startingCodePoint] = (char) i;
-        }
-        return new String(tmp);
-    }
-
-    public void time_getBestDateTimePattern(int reps) throws Exception {
-        for (int rep = 0; rep < reps; ++rep) {
-            ICU.getBestDateTimePattern("dEEEMMM", new Locale("en", "US"));
-        }
-    }
-
-    // Convert standard lowercase ASCII characters to uppercase using ICU4C in the US locale.
-    public void time_toUpperCaseAsciiUS(int reps) {
-        for (int i = 0; i < reps; i++) {
-            ICU.toUpperCase(ASCII_LOWERCASE, Locale.US);
-        }
-    }
-
-    // Convert standard uppercase ASCII characters to lowercase.
-    public void time_toLowerCaseAsciiUs(int reps) {
-        for (int i = 0; i < reps; i++) {
-            ICU.toLowerCase(ASCII_UPPERCASE, Locale.US);
-        }
-    }
-
-    // Convert Latin 1 supplement characters to uppercase in France locale.
-    public void time_toUpperCaseLat1SuplFr(int reps) {
-        for (int i = 0; i < reps; i++) {
-            ICU.toUpperCase(LAT_1_SUPPLEMENT, Locale.FRANCE);
-        }
-    }
-
-    // Convert Latin Extension A characters to uppercase in Czech locale
-    public void time_toUpperCaseLatExtACz(int reps) {
-        for (int i = 0; i < reps; i++) {
-            ICU.toUpperCase(LAT_EXTENDED_A, CZECH_LOCALE);
-        }
-    }
-
-    // Convert Latin Extension B characters to uppercase in Pinyin locale.
-    public void time_toUpperCaseLatExtBPinyin(int reps) {
-        for (int i = 0; i < reps; i++) {
-            ICU.toUpperCase(LAT_EXTENDED_B, PINYIN_LOCALE);
-        }
-    }
-
-}
diff --git a/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java b/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java
deleted file mode 100644
index 6ddbc77..0000000
--- a/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package benchmarks.regression;
-
-import java.util.Locale;
-import java.util.TimeZone;
-
-import static libcore.icu.DateUtilsBridge.FORMAT_ABBREV_RELATIVE;
-import static libcore.icu.RelativeDateTimeFormatter.getRelativeDateTimeString;
-import static libcore.icu.RelativeDateTimeFormatter.getRelativeTimeSpanString;
-
-public class RelativeDateTimeFormatterBenchmark {
-  public void timeRelativeDateTimeFormatter_getRelativeTimeSpanString(int reps) throws Exception {
-    Locale l = Locale.US;
-    TimeZone utc = TimeZone.getTimeZone("Europe/London");
-    int flags = 0;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      getRelativeTimeSpanString(l, utc, 0L, 0L, 0L, flags);
-    }
-  }
-
-  public void timeRelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV(int reps) throws Exception {
-    Locale l = Locale.US;
-    TimeZone utc = TimeZone.getTimeZone("UTC");
-    int flags = FORMAT_ABBREV_RELATIVE;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      getRelativeTimeSpanString(l, utc, 0L, 0L, 0L, flags);
-    }
-  }
-
-  public void timeRelativeDateTimeFormatter_getRelativeDateTimeString(int reps) throws Exception {
-    Locale l = Locale.US;
-    TimeZone utc = TimeZone.getTimeZone("UTC");
-    int flags = 0;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      getRelativeDateTimeString(l, utc, 0L, 0L, 0L, 0L, flags);
-    }
-  }
-
-  public void timeRelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV(int reps) throws Exception {
-    Locale l = Locale.US;
-    TimeZone utc = TimeZone.getTimeZone("America/Los_Angeles");
-    int flags = FORMAT_ABBREV_RELATIVE;
-
-    for (int rep = 0; rep < reps; ++rep) {
-      getRelativeDateTimeString(l, utc, 0L, 0L, 0L, 0L, flags);
-    }
-  }
-}
diff --git a/benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java b/benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java
deleted file mode 100644
index 1693157..0000000
--- a/benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package benchmarks.regression;
-
-import com.google.caliper.Param;
-import java.util.Locale;
-
-public class StringCaseMappingBenchmark {
-    enum Inputs {
-        EMPTY(""),
-
-        // TODO: include hairy inputs like turkish and greek.
-        // TODO: locale makes a difference too.
-
-        LOWER2(lower(2)),
-        UPPER2(upper(2)),
-        MIXED2(mixed(2)),
-
-        LOWER8(lower(8)),
-        UPPER8(upper(8)),
-        MIXED8(mixed(8)),
-
-        LOWER32(lower(32)),
-        UPPER32(upper(32)),
-        MIXED32(mixed(32)),
-
-        LOWER512(lower(512)),
-        UPPER512(upper(512)),
-        MIXED512(mixed(512)),
-
-        LOWER2048(lower(2048)),
-        UPPER2048(upper(2048)),
-        MIXED2048(mixed(2048)),
-
-        LOWER_1M(lower(1024*1024)),
-        UPPER_1M(upper(1024*1024)),
-        MIXED_1M(mixed(1024*1024));
-
-        final String value;
-        private Inputs(String value) { this.value = value; }
-        private static String lower(int length) {
-            return makeString(length, "a0b1c2d3e4f5g6h7i8j9klmnopqrstuvwxyz");
-        }
-        private static String upper(int length) {
-            return makeString(length, "A0B1C2D3E4F5G6H7I8J9KLMNOPQRSTUVWXYZ");
-        }
-        private static String mixed(int length) {
-            return makeString(length, "Aa0Bb1Cc2Dd3Ee4Ff5Gg6Hh7Ii8Jj9KkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz");
-        }
-        private static String makeString(int length, String alphabet) {
-            StringBuilder sb = new StringBuilder(length);
-            for (int i = 0; i < length; ++i) {
-                sb.append(alphabet.charAt(i % alphabet.length()));
-            }
-            return sb.toString();
-        }
-    }
-    @Param private Inputs s;
-
-    public void timeToUpperCase_US(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            s.value.toUpperCase(Locale.US);
-        }
-    }
-
-    // toUpperCase for Greek is an extra-hard case that uses icu4c's Transliterator.
-    public void timeToUpperCase_el_GR(int reps) {
-        Locale el_GR = new Locale("el", "GR");
-        for (int i = 0; i < reps; ++i) {
-            s.value.toUpperCase(el_GR);
-        }
-    }
-
-    public void timeToLowerCase_US(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            s.value.toLowerCase(Locale.US);
-        }
-    }
-
-    public void timeToUpperCase_Ascii(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            toUpperCaseAscii(s.value);
-        }
-    }
-
-    public void timeToLowerCase_Ascii(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            toLowerCaseAscii(s.value);
-        }
-    }
-
-    public void timeToUpperCase_ICU(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            libcore.icu.ICU.toUpperCase(s.value, Locale.US);
-        }
-    }
-
-    public void timeToLowerCase_ICU(int reps) {
-        for (int i = 0; i < reps; ++i) {
-            libcore.icu.ICU.toLowerCase(s.value, Locale.US);
-        }
-    }
-
-    public static String toUpperCaseAscii(String s) {
-        for (int i = 0, length = s.length(); i < length; i++) {
-            char c = s.charAt(i);
-            if (c < 'a' || c > 'z') {
-                continue; // fast path avoids allocation
-            }
-
-            // slow path: s contains lower case chars
-            char[] result = s.toCharArray();
-            for (; i < length; i++) {
-                c = result[i];
-                if (c >= 'a' && c <= 'z') {
-                    result[i] -= ('a' - 'A');
-                }
-            }
-            return new String(result);
-        }
-        return s;
-    }
-
-    public static String toLowerCaseAscii(String s) {
-        for (int i = 0, length = s.length(); i < length; i++) {
-            char c = s.charAt(i);
-            if (c < 'A' || c > 'Z') {
-                continue; // fast path avoids allocation
-            }
-
-            // slow path: s contains upper case chars
-            char[] result = s.toCharArray();
-            for (; i < length; i++) {
-                c = result[i];
-                if (c >= 'A' && c <= 'Z') {
-                    result[i] += ('a' - 'A');
-                }
-            }
-            return new String(result);
-        }
-        return s;
-    }
-}
diff --git a/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java b/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
index 7da3027..9839889 100644
--- a/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
+++ b/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
@@ -16,6 +16,7 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.File;
 import java.net.URL;
 import java.nio.ByteBuffer;
@@ -43,6 +44,7 @@
      */
     /* @NonNull */ private static volatile Reporter reporter = null;
 
+    @UnsupportedAppUsage
     private final DexPathList pathList;
 
     /**
@@ -68,6 +70,7 @@
     /**
      * @hide
      */
+    @UnsupportedAppUsage
     public BaseDexClassLoader(String dexPath, File optimizedDirectory,
             String librarySearchPath, ClassLoader parent, boolean isTrusted) {
         super(parent);
@@ -144,6 +147,7 @@
     /**
      * @hide
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public void addDexPath(String dexPath) {
         addDexPath(dexPath, false /*isTrusted*/);
@@ -152,6 +156,7 @@
     /**
      * @hide
      */
+    @UnsupportedAppUsage
     public void addDexPath(String dexPath, boolean isTrusted) {
         pathList.addDexPath(dexPath, null /*optimizedDirectory*/, isTrusted);
     }
@@ -226,6 +231,7 @@
     /**
      * @hide
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public String getLdLibraryPath() {
         StringBuilder result = new StringBuilder();
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index b1b36f3..c608407 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -18,6 +18,7 @@
 
 import libcore.util.NonNull;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.Objects;
 
 /**
@@ -57,12 +58,14 @@
         /**
          * Called on disk reads.
          */
+        @UnsupportedAppUsage
         @libcore.api.CorePlatformApi
         void onReadFromDisk();
 
         /**
          * Called on network operations.
          */
+        @UnsupportedAppUsage
         @libcore.api.IntraCoreApi
         void onNetwork();
 
@@ -122,14 +125,18 @@
     @Deprecated
     public static class BlockGuardPolicyException extends RuntimeException {
         // bitmask of DISALLOW_*, PENALTY_*, etc flags
+        @UnsupportedAppUsage
         private final int mPolicyState;
+        @UnsupportedAppUsage
         private final int mPolicyViolated;
+        @UnsupportedAppUsage
         private final String mMessage;   // may be null
 
         public BlockGuardPolicyException(int policyState, int policyViolated) {
             this(policyState, policyViolated, null);
         }
 
+        @UnsupportedAppUsage
         public BlockGuardPolicyException(int policyState, int policyViolated, String message) {
             mPolicyState = policyState;
             mPolicyViolated = policyViolated;
@@ -160,6 +167,7 @@
     /**
      * The default, permissive per-thread policy.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final Policy LAX_POLICY = new Policy() {
         @Override public String toString() { return "LAX_POLICY"; }
@@ -184,6 +192,7 @@
         @Override public void onPathAccess(String path) {}
     };
 
+    @UnsupportedAppUsage
     private static ThreadLocal<Policy> threadPolicy = new ThreadLocal<Policy>() {
         @Override protected Policy initialValue() {
             return LAX_POLICY;
@@ -198,6 +207,7 @@
      * @return the current thread's policy. Will return the {@link #LAX_POLICY}
      *         instance if nothing else is set.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public static @NonNull Policy getThreadPolicy() {
@@ -213,6 +223,7 @@
      * @param policy policy to set. Use the public {@link #LAX_POLICY} if you
      *            want to unset the active policy.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void setThreadPolicy(@NonNull Policy policy) {
         threadPolicy.set(Objects.requireNonNull(policy));
diff --git a/dalvik/src/main/java/dalvik/system/CloseGuard.java b/dalvik/src/main/java/dalvik/system/CloseGuard.java
index d6c0695..6fe94a9 100644
--- a/dalvik/src/main/java/dalvik/system/CloseGuard.java
+++ b/dalvik/src/main/java/dalvik/system/CloseGuard.java
@@ -16,6 +16,8 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * CloseGuard is a mechanism for flagging implicit finalizer cleanup of
  * resources that should have been cleaned up by explicit close
@@ -136,6 +138,7 @@
      * Returns a CloseGuard instance. {@code #open(String)} can be used to set
      * up the instance to warn on failure to close.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public static CloseGuard get() {
@@ -149,6 +152,7 @@
      * #getReporter() reporter} is informed of unclosed resources; otherwise a
      * one-line warning is logged.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void setEnabled(boolean enabled) {
         CloseGuard.stackAndTrackingEnabled = enabled;
@@ -165,6 +169,7 @@
      * Used to replace default Reporter used to warn of CloseGuard
      * violations when stack tracking is enabled. Must be non-null.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void setReporter(Reporter rep) {
         if (rep == null) {
@@ -204,6 +209,7 @@
         return currentTracker;
     }
 
+    @UnsupportedAppUsage
     private CloseGuard() {}
 
     /**
@@ -214,6 +220,7 @@
      * @param closer non-null name of explicit termination method. Printed by warnIfOpen.
      * @throws NullPointerException if closer is null.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public void open(String closer) {
@@ -244,6 +251,7 @@
      * Marks this CloseGuard instance as closed to avoid warnings on
      * finalization.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public void close() {
@@ -262,6 +270,7 @@
      * the allocation to the current reporter. If it was not enabled, it just
      * directly logs a brief message.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public void warnIfOpen() {
@@ -296,6 +305,7 @@
      */
     @libcore.api.CorePlatformApi
     public interface Reporter {
+        @UnsupportedAppUsage
         @libcore.api.CorePlatformApi
         void report(String message, Throwable allocationSite);
     }
@@ -304,6 +314,9 @@
      * Default Reporter which reports CloseGuard violations to the log.
      */
     private static final class DefaultReporter implements Reporter {
+        @UnsupportedAppUsage
+        private DefaultReporter() {}
+
         @Override public void report (String message, Throwable allocationSite) {
             System.logW(message, allocationSite);
         }
diff --git a/dalvik/src/main/java/dalvik/system/DexFile.java b/dalvik/src/main/java/dalvik/system/DexFile.java
index 78db5d0..535257f 100644
--- a/dalvik/src/main/java/dalvik/system/DexFile.java
+++ b/dalvik/src/main/java/dalvik/system/DexFile.java
@@ -17,6 +17,7 @@
 package dalvik.system;
 
 import android.system.ErrnoException;
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.annotation.optimization.ReachabilitySensitive;
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -44,10 +45,13 @@
    * If close is called, mCookie becomes null but the internal cookie is preserved if the close
    * failed so that we can free resources in the finalizer.
    */
+    @UnsupportedAppUsage
     @ReachabilitySensitive
     private Object mCookie;
 
+    @UnsupportedAppUsage
     private Object mInternalCookie;
+    @UnsupportedAppUsage
     private final String mFileName;
 
     /**
@@ -190,6 +194,7 @@
      * @throws IOException
      *  If unable to open the source or output file.
      */
+    @UnsupportedAppUsage
     static DexFile loadDex(String sourcePathName, String outputPathName,
         int flags, ClassLoader loader, DexPathList.Element[] elements) throws IOException {
 
@@ -273,6 +278,7 @@
      *
      * @hide
      */
+    @UnsupportedAppUsage
     public Class loadClassBinaryName(String name, ClassLoader loader, List<Throwable> suppressed) {
         return defineClass(name, loader, mCookie, this, suppressed);
     }
@@ -309,6 +315,7 @@
      */
     private static class DFEnum implements Enumeration<String> {
         private int mIndex;
+        @UnsupportedAppUsage
         private String[] mNameList;
 
         DFEnum(DexFile df) {
@@ -349,6 +356,7 @@
      * Open a DEX file.  The value returned is a magic VM cookie.  On
      * failure, an IOException is thrown.
      */
+    @UnsupportedAppUsage
     private static Object openDexFile(String sourceName, String outputName, int flags,
             ClassLoader loader, DexPathList.Element[] elements) throws IOException {
         // Use absolute paths to enable the use of relative paths when testing on host.
@@ -375,6 +383,7 @@
     /*
      * Returns true if the dex file is backed by a valid oat file.
      */
+    @UnsupportedAppUsage
     /*package*/ boolean isBackedByOatFile() {
         return isBackedByOatFile(mCookie);
     }
@@ -393,6 +402,7 @@
     private static native Class defineClassNative(String name, ClassLoader loader, Object cookie,
                                                   DexFile dexFile)
             throws ClassNotFoundException, NoClassDefFoundError;
+    @UnsupportedAppUsage
     private static native String[] getClassNameList(Object cookie);
     private static native boolean isBackedByOatFile(Object cookie);
     private static native void setTrusted(Object cookie);
@@ -400,6 +410,7 @@
      * Open a DEX file.  The value returned is a magic VM cookie.  On
      * failure, an IOException is thrown.
      */
+    @UnsupportedAppUsage
     private static native Object openDexFileNative(String sourceName, String outputName, int flags,
             ClassLoader loader, DexPathList.Element[] elements);
 
diff --git a/dalvik/src/main/java/dalvik/system/DexPathList.java b/dalvik/src/main/java/dalvik/system/DexPathList.java
index e68e365..1bbb6d9 100644
--- a/dalvik/src/main/java/dalvik/system/DexPathList.java
+++ b/dalvik/src/main/java/dalvik/system/DexPathList.java
@@ -18,6 +18,7 @@
 
 import android.system.ErrnoException;
 import android.system.StructStat;
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -54,6 +55,7 @@
     private static final String zipSeparator = "!/";
 
     /** class definition context */
+    @UnsupportedAppUsage
     private final ClassLoader definingContext;
 
     /**
@@ -61,21 +63,26 @@
      * Should be called pathElements, but the Facebook app uses reflection
      * to modify 'dexElements' (http://b/7726934).
      */
+    @UnsupportedAppUsage
     private Element[] dexElements;
 
     /** List of native library path elements. */
     // Some applications rely on this field being an array or we'd use a final list here
+    @UnsupportedAppUsage
     /* package visible for testing */ NativeLibraryElement[] nativeLibraryPathElements;
 
     /** List of application native library directories. */
+    @UnsupportedAppUsage
     private final List<File> nativeLibraryDirectories;
 
     /** List of system native library directories. */
+    @UnsupportedAppUsage
     private final List<File> systemNativeLibraryDirectories;
 
     /**
      * Exceptions thrown during creation of the dexElements list.
      */
+    @UnsupportedAppUsage
     private IOException[] dexElementsSuppressedExceptions;
 
     /**
@@ -127,6 +134,7 @@
      * should be found and written to, or {@code null} to use the default
      * system directory for same
      */
+    @UnsupportedAppUsage
     public DexPathList(ClassLoader definingContext, String dexPath,
             String librarySearchPath, File optimizedDirectory) {
         this(definingContext, dexPath, librarySearchPath, optimizedDirectory, false);
@@ -217,6 +225,7 @@
      * should be found and written to, or {@code null} to use the default
      * system directory for same
      */
+    @UnsupportedAppUsage
     public void addDexPath(String dexPath, File optimizedDirectory) {
       addDexPath(dexPath, optimizedDirectory, false);
     }
@@ -271,6 +280,7 @@
      * are empty or {@code null}, or all elements get pruned out, then
      * this returns a zero-element list.
      */
+    @UnsupportedAppUsage
     private static List<File> splitPaths(String searchPath, boolean directoriesOnly) {
         List<File> result = new ArrayList<>();
 
@@ -293,6 +303,7 @@
         return result;
     }
 
+    @UnsupportedAppUsage
     private static Element[] makeInMemoryDexElements(ByteBuffer[] dexFiles,
             List<IOException> suppressedExceptions) {
         Element[] elements = new Element[dexFiles.length];
@@ -316,6 +327,7 @@
      * Makes an array of dex/resource path elements, one per element of
      * the given array.
      */
+    @UnsupportedAppUsage
     private static Element[] makeDexElements(List<File> files, File optimizedDirectory,
             List<IOException> suppressedExceptions, ClassLoader loader) {
         return makeDexElements(files, optimizedDirectory, suppressedExceptions, loader, false);
@@ -387,6 +399,7 @@
      * {@code optimizedDirectory} is {@code null}. An application image file may be associated with
      * the {@code loader} if it is not null.
      */
+    @UnsupportedAppUsage
     private static DexFile loadDexFile(File file, File optimizedDirectory, ClassLoader loader,
                                        Element[] elements)
             throws IOException {
@@ -437,6 +450,7 @@
      * TODO (dimitry): Revert after apps stops relying on the existence of this
      * method (see http://b/21957414 and http://b/26317852 for details)
      */
+    @UnsupportedAppUsage
     @SuppressWarnings("unused")
     private static Element[] makePathElements(List<File> files, File optimizedDirectory,
             List<IOException> suppressedExceptions) {
@@ -447,6 +461,7 @@
      * Makes an array of directory/zip path elements for the native library search path, one per
      * element of the given array.
      */
+    @UnsupportedAppUsage
     private static NativeLibraryElement[] makePathElements(List<File> files) {
         NativeLibraryElement[] elements = new NativeLibraryElement[files.size()];
         int elementsPos = 0;
@@ -580,6 +595,7 @@
      * Note: This method will attempt to dedupe elements.
      * Note: This method replaces the value of {@link #nativeLibraryPathElements}
      */
+    @UnsupportedAppUsage
     public void addNativePath(Collection<String> libPaths) {
         if (libPaths.isEmpty()) {
             return;
@@ -608,8 +624,10 @@
          * A file denoting a zip file (in case of a resource jar or a dex jar), or a directory
          * (only when dexFile is null).
          */
+        @UnsupportedAppUsage
         private final File path;
 
+        @UnsupportedAppUsage
         private final DexFile dexFile;
 
         private ClassPathURLStreamHandler urlHandler;
@@ -619,6 +637,7 @@
          * Element encapsulates a dex file. This may be a plain dex file (in which case dexZipPath
          * should be null), or a jar (in which case dexZipPath should denote the zip file).
          */
+        @UnsupportedAppUsage
         public Element(DexFile dexFile, File dexZipPath) {
             this.dexFile = dexFile;
             this.path = dexZipPath;
@@ -642,6 +661,7 @@
          *             classes and resources, and NativeLibraryElement for the library
          *             search path.
          */
+        @UnsupportedAppUsage
         @Deprecated
         public Element(File dir, boolean isDirectory, File zip, DexFile dexFile) {
             System.err.println("Warning: Using deprecated Element constructor. Do not use internal"
@@ -756,6 +776,7 @@
         /**
          * A file denoting a directory or zip file.
          */
+        @UnsupportedAppUsage
         private final File path;
 
         /**
@@ -766,6 +787,7 @@
         private ClassPathURLStreamHandler urlHandler;
         private boolean initialized;
 
+        @UnsupportedAppUsage
         public NativeLibraryElement(File dir) {
             this.path = dir;
             this.zipDir = null;
diff --git a/dalvik/src/main/java/dalvik/system/SocketTagger.java b/dalvik/src/main/java/dalvik/system/SocketTagger.java
index 15c3d8d..839215a 100644
--- a/dalvik/src/main/java/dalvik/system/SocketTagger.java
+++ b/dalvik/src/main/java/dalvik/system/SocketTagger.java
@@ -16,6 +16,7 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.FileDescriptor;
 import java.net.DatagramSocket;
 import java.net.Socket;
@@ -53,6 +54,7 @@
     @libcore.api.CorePlatformApi
     public abstract void untag(FileDescriptor socketDescriptor) throws SocketException;
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public final void tag(Socket socket) throws SocketException {
         if (!socket.isClosed()) {
@@ -60,6 +62,7 @@
         }
     }
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public final void untag(Socket socket) throws SocketException {
         if (!socket.isClosed()) {
@@ -95,6 +98,7 @@
     /**
      * Returns this process socket tagger.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static synchronized SocketTagger get() {
         return tagger;
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java
index 36ccdc1..1802a72 100644
--- a/dalvik/src/main/java/dalvik/system/VMDebug.java
+++ b/dalvik/src/main/java/dalvik/system/VMDebug.java
@@ -16,6 +16,7 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.annotation.optimization.FastNative;
 import java.io.FileDescriptor;
 import java.io.IOException;
@@ -139,6 +140,7 @@
      *
      * @return true if (and only if) a debugger is connected
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @FastNative
     public static native boolean isDebuggerConnected();
@@ -393,6 +395,7 @@
      * Dumps the contents of the VM reference tables (e.g. JNI locals and
      * globals) to the log file.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static native void dumpReferenceTables();
 
@@ -580,5 +583,6 @@
      *
      * @param klass The class whose methods should be exempted.
      */
+    @UnsupportedAppUsage
     public static native void allowHiddenApiReflectionFrom(Class<?> klass);
 }
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/String2Test.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/String2Test.java
index a3e6e54..de7ec1a 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/String2Test.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/String2Test.java
@@ -718,6 +718,7 @@
     /**
      * java.lang.String#substring(int)
      */
+    @SuppressWarnings("SubstringOfZero")
     public void test_substringI() {
         // Test for method java.lang.String java.lang.String.substring(int)
         assertEquals("Incorrect substring returned", "World", hw1.substring(5));
diff --git a/json/src/main/java/org/json/JSONArray.java b/json/src/main/java/org/json/JSONArray.java
index 996f449..5e758d7 100644
--- a/json/src/main/java/org/json/JSONArray.java
+++ b/json/src/main/java/org/json/JSONArray.java
@@ -16,6 +16,7 @@
 
 package org.json;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -48,6 +49,7 @@
  */
 public class JSONArray {
 
+    @UnsupportedAppUsage
     private final List<Object> values;
 
     /**
@@ -607,6 +609,7 @@
         return stringer.toString();
     }
 
+    @UnsupportedAppUsage
     void writeTo(JSONStringer stringer) throws JSONException {
         stringer.array();
         for (Object value : values) {
diff --git a/json/src/main/java/org/json/JSONObject.java b/json/src/main/java/org/json/JSONObject.java
index 2aae841..b274c2f 100644
--- a/json/src/main/java/org/json/JSONObject.java
+++ b/json/src/main/java/org/json/JSONObject.java
@@ -16,6 +16,7 @@
 
 package org.json;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -80,6 +81,7 @@
  */
 public class JSONObject {
 
+    @UnsupportedAppUsage
     private static final Double NEGATIVE_ZERO = -0d;
 
     /**
@@ -108,6 +110,7 @@
         }
     };
 
+    @UnsupportedAppUsage
     private final LinkedHashMap<String, Object> nameValuePairs;
 
     /**
@@ -328,6 +331,7 @@
      *
      * @hide
      */
+    @UnsupportedAppUsage
     public JSONObject append(String name, Object value) throws JSONException {
         Object current = nameValuePairs.get(checkName(name));
 
@@ -347,6 +351,7 @@
         return this;
     }
 
+    @UnsupportedAppUsage
     String checkName(String name) throws JSONException {
         if (name == null) {
             throw new JSONException("Names must be non-null");
@@ -668,6 +673,7 @@
      *
      * @hide.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public Set<String> keySet() {
         return nameValuePairs.keySet();
@@ -718,6 +724,7 @@
         return stringer.toString();
     }
 
+    @UnsupportedAppUsage
     void writeTo(JSONStringer stringer) throws JSONException {
         stringer.object();
         for (Map.Entry<String, Object> entry : nameValuePairs.entrySet()) {
diff --git a/json/src/main/java/org/json/JSONStringer.java b/json/src/main/java/org/json/JSONStringer.java
index dd3b2a7..3d1738c 100644
--- a/json/src/main/java/org/json/JSONStringer.java
+++ b/json/src/main/java/org/json/JSONStringer.java
@@ -16,6 +16,7 @@
 
 package org.json;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -61,6 +62,7 @@
 public class JSONStringer {
 
     /** The output data, containing at most one top-level array or object. */
+    @UnsupportedAppUsage
     final StringBuilder out = new StringBuilder();
 
     /**
@@ -111,18 +113,21 @@
      * Unlike the original implementation, this stack isn't limited to 20
      * levels of nesting.
      */
+    @UnsupportedAppUsage
     private final List<Scope> stack = new ArrayList<Scope>();
 
     /**
      * A string containing a full set of spaces for a single level of
      * indentation, or null for no pretty printing.
      */
+    @UnsupportedAppUsage
     private final String indent;
 
     public JSONStringer() {
         indent = null;
     }
 
+    @UnsupportedAppUsage
     JSONStringer(int indentSpaces) {
         char[] indentChars = new char[indentSpaces];
         Arrays.fill(indentChars, ' ');
@@ -171,6 +176,7 @@
      * Enters a new scope by appending any necessary whitespace and the given
      * bracket.
      */
+    @UnsupportedAppUsage
     JSONStringer open(Scope empty, String openBracket) throws JSONException {
         if (stack.isEmpty() && out.length() > 0) {
             throw new JSONException("Nesting problem: multiple top-level roots");
@@ -185,6 +191,7 @@
      * Closes the current scope by appending any necessary whitespace and the
      * given bracket.
      */
+    @UnsupportedAppUsage
     JSONStringer close(Scope empty, Scope nonempty, String closeBracket) throws JSONException {
         Scope context = peek();
         if (context != nonempty && context != empty) {
@@ -202,6 +209,7 @@
     /**
      * Returns the value on the top of the stack.
      */
+    @UnsupportedAppUsage
     private Scope peek() throws JSONException {
         if (stack.isEmpty()) {
             throw new JSONException("Nesting problem");
@@ -212,6 +220,7 @@
     /**
      * Replace the value on the top of the stack with the given value.
      */
+    @UnsupportedAppUsage
     private void replaceTop(Scope topOfStack) {
         stack.set(stack.size() - 1, topOfStack);
     }
@@ -299,6 +308,7 @@
         return this;
     }
 
+    @UnsupportedAppUsage
     private void string(String value) {
         out.append("\"");
         for (int i = 0, length = value.length(); i < length; i++) {
@@ -350,6 +360,7 @@
         out.append("\"");
     }
 
+    @UnsupportedAppUsage
     private void newline() {
         if (indent == null) {
             return;
@@ -380,6 +391,7 @@
      * Inserts any necessary separators and whitespace before a name. Also
      * adjusts the stack to expect the key's value.
      */
+    @UnsupportedAppUsage
     private void beforeKey() throws JSONException {
         Scope context = peek();
         if (context == Scope.NONEMPTY_OBJECT) { // first in object
@@ -396,6 +408,7 @@
      * inline array, or inline object. Also adjusts the stack to expect either a
      * closing bracket or another element.
      */
+    @UnsupportedAppUsage
     private void beforeValue() throws JSONException {
         if (stack.isEmpty()) {
             return;
diff --git a/json/src/main/java/org/json/JSONTokener.java b/json/src/main/java/org/json/JSONTokener.java
index 8caecc8..55667b0 100644
--- a/json/src/main/java/org/json/JSONTokener.java
+++ b/json/src/main/java/org/json/JSONTokener.java
@@ -16,6 +16,8 @@
 
 package org.json;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 // Note: this class was written without inspecting the non-free org.json sourcecode.
 
 /**
@@ -62,12 +64,14 @@
 public class JSONTokener {
 
     /** The input JSON. */
+    @UnsupportedAppUsage
     private final String in;
 
     /**
      * The index of the next character to be returned by {@link #next}. When
      * the input is exhausted, this equals the input's length.
      */
+    @UnsupportedAppUsage
     private int pos;
 
     /**
@@ -112,6 +116,7 @@
         }
     }
 
+    @UnsupportedAppUsage
     private int nextCleanInternal() throws JSONException {
         while (pos < in.length()) {
             int c = in.charAt(pos++);
@@ -171,6 +176,7 @@
      * is terminated by "\r\n", the '\n' must be consumed as whitespace by the
      * caller.
      */
+    @UnsupportedAppUsage
     private void skipToEndOfLine() {
         for (; pos < in.length(); pos++) {
             char c = in.charAt(pos);
@@ -234,6 +240,7 @@
      * been read. This supports both unicode escapes "u000A" and two-character
      * escapes "\n".
      */
+    @UnsupportedAppUsage
     private char readEscapeCharacter() throws JSONException {
         char escaped = in.charAt(pos++);
         switch (escaped) {
@@ -277,6 +284,7 @@
      * values will be returned as an Integer, Long, or Double, in that order of
      * preference.
      */
+    @UnsupportedAppUsage
     private Object readLiteral() throws JSONException {
         String literal = nextToInternal("{}[]/\\:,=;# \t\f");
 
@@ -331,6 +339,7 @@
      * Returns the string up to but not including any of the given characters or
      * a newline character. This does not consume the excluded character.
      */
+    @UnsupportedAppUsage
     private String nextToInternal(String excluded) {
         int start = pos;
         for (; pos < in.length(); pos++) {
@@ -346,6 +355,7 @@
      * Reads a sequence of key/value pairs and the trailing closing brace '}' of
      * an object. The opening brace '{' should have already been read.
      */
+    @UnsupportedAppUsage
     private JSONObject readObject() throws JSONException {
         JSONObject result = new JSONObject();
 
@@ -401,6 +411,7 @@
      * "[]" yields an empty array, but "[,]" returns a two-element array
      * equivalent to "[null,null]".
      */
+    @UnsupportedAppUsage
     private JSONArray readArray() throws JSONException {
         JSONArray result = new JSONArray();
 
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 602d0f5..cd061b9 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -16,6 +16,7 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.annotation.optimization.FastNative;
 import java.lang.ref.FinalizerReference;
 import java.util.HashMap;
@@ -78,6 +79,7 @@
      *
      * @return the runtime object
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static VMRuntime getRuntime() {
         return THE_ONE;
@@ -107,18 +109,21 @@
     /**
      * Returns the name of the shared library providing the VM implementation.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public native String vmLibrary();
 
     /**
      * Returns the VM's instruction set.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public native String vmInstructionSet();
 
     /**
      * Returns whether the VM is running in 64-bit mode.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @FastNative
     public native boolean is64Bit();
@@ -154,6 +159,7 @@
      * @return the previous ideal heap utilization
      * @throws IllegalArgumentException if newTarget is &lt;= 0.0 or &gt;= 1.0
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public float setTargetHeapUtilization(float newTarget) {
         if (newTarget <= 0.0f || newTarget >= 1.0f) {
@@ -176,6 +182,7 @@
      * app starts to run, because it may change the VM's behavior in
      * dangerous ways. Defaults to {@link #SDK_VERSION_CUR_DEVELOPMENT}.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public synchronized void setTargetSdkVersion(int targetSdkVersion) {
         this.targetSdkVersion = targetSdkVersion;
@@ -197,6 +204,7 @@
      * This method exists for binary compatibility.  It was part of a
      * heap sizing API which was removed in Android 3.0 (Honeycomb).
      */
+    @UnsupportedAppUsage
     @Deprecated
     public long getMinimumHeapSize() {
         return 0;
@@ -206,6 +214,7 @@
      * This method exists for binary compatibility.  It was part of a
      * heap sizing API which was removed in Android 3.0 (Honeycomb).
      */
+    @UnsupportedAppUsage
     @Deprecated
     public long setMinimumHeapSize(long size) {
         return 0;
@@ -215,6 +224,7 @@
      * This method exists for binary compatibility.  It used to
      * perform a garbage collection that cleared SoftReferences.
      */
+    @UnsupportedAppUsage
     @Deprecated
     public void gcSoftReferences() {}
 
@@ -222,6 +232,7 @@
      * This method exists for binary compatibility.  It is equivalent
      * to {@link System#runFinalization}.
      */
+    @UnsupportedAppUsage
     @Deprecated
     public void runFinalizationSync() {
         System.runFinalization();
@@ -239,6 +250,7 @@
      * This method exists for binary compatibility.  It was part of
      * the external allocation API which was removed in Android 3.0 (Honeycomb).
      */
+    @UnsupportedAppUsage
     @Deprecated
     public boolean trackExternalAllocation(long size) {
         return true;
@@ -248,6 +260,7 @@
      * This method exists for binary compatibility.  It was part of
      * the external allocation API which was removed in Android 3.0 (Honeycomb).
      */
+    @UnsupportedAppUsage
     @Deprecated
     public void trackExternalFree(long size) {}
 
@@ -255,6 +268,7 @@
      * This method exists for binary compatibility.  It was part of
      * the external allocation API which was removed in Android 3.0 (Honeycomb).
      */
+    @UnsupportedAppUsage
     @Deprecated
     public long getExternalBytesAllocated() {
         return 0;
@@ -306,6 +320,7 @@
      * This is used to implement native allocations on the Java heap, such as DirectByteBuffers
      * and Bitmaps.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @FastNative
     public native Object newNonMovableArray(Class<?> componentType, int length);
@@ -323,6 +338,7 @@
      * Returns the address of array[0]. This differs from using JNI in that JNI might lie and
      * give you the address of a copy of the array when in forcecopy mode.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @FastNative
     public native long addressOf(Object array);
@@ -331,6 +347,7 @@
      * Removes any growth limits, allowing the application to allocate
      * up to the maximum heap size.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public native void clearGrowthLimit();
 
@@ -367,12 +384,14 @@
      * unusually high rate and a GC is performed inside of the function to prevent memory usage
      * from excessively increasing.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public native void registerNativeAllocation(int bytes);
 
     /**
      * Registers a native free by reducing the number of native bytes accounted for.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public native void registerNativeFree(int bytes);
 
@@ -390,6 +409,7 @@
      * @see #Runtime.runFinalization()
      * @see #wait(long,int)
      */
+    @UnsupportedAppUsage
     public static void runFinalization(long timeout) {
         try {
             FinalizerReference.finalizeAllEnqueued(timeout);
@@ -438,6 +458,7 @@
      *
      * This influences the compilation of the applications classes.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static String getInstructionSet(String abi) {
         final String instructionSet = ABI_TO_INSTRUCTION_SET_MAP.get(abi);
@@ -455,6 +476,7 @@
                 "mips64".equals(instructionSet);
     }
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static boolean is64BitAbi(String abi) {
         return is64BitInstructionSet(getInstructionSet(abi));
@@ -481,6 +503,7 @@
     /**
      * Returns the instruction set of the current runtime.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static native String getCurrentInstructionSet();
 
diff --git a/libart/src/main/java/dalvik/system/VMStack.java b/libart/src/main/java/dalvik/system/VMStack.java
index 45c6648..a76ce09 100644
--- a/libart/src/main/java/dalvik/system/VMStack.java
+++ b/libart/src/main/java/dalvik/system/VMStack.java
@@ -16,6 +16,7 @@
 
 package dalvik.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.annotation.optimization.FastNative;
 
 /**
@@ -35,6 +36,7 @@
      *         Note that that can return {@link BootClassLoader} on Android where the RI
      *         would have returned null.
      */
+    @UnsupportedAppUsage
     @FastNative
     @Deprecated
     native public static ClassLoader getCallingClassLoader();
@@ -55,6 +57,7 @@
      *
      * @return the requested class, or {@code null}.
      */
+    @UnsupportedAppUsage
     @FastNative
     native public static Class<?> getStackClass2();
 
@@ -73,6 +76,7 @@
      * @return an array of stack trace elements, or null if the thread
      *      doesn't have a stack trace (e.g. because it exited)
      */
+    @UnsupportedAppUsage
     @FastNative
     native public static StackTraceElement[] getThreadStackTrace(Thread t);
 
@@ -100,6 +104,7 @@
      *      desired. Unused elements will be filled with null values.
      * @return the number of elements filled
      */
+    @UnsupportedAppUsage
     @FastNative
     native public static int fillStackTraceElements(Thread t,
         StackTraceElement[] stackTraceElements);
diff --git a/libart/src/main/java/java/lang/Daemons.java b/libart/src/main/java/java/lang/Daemons.java
index f25c78c..a04bee8 100644
--- a/libart/src/main/java/java/lang/Daemons.java
+++ b/libart/src/main/java/java/lang/Daemons.java
@@ -18,6 +18,7 @@
 
 import android.system.Os;
 import android.system.OsConstants;
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.system.VMRuntime;
 import java.lang.ref.FinalizerReference;
 import java.lang.ref.Reference;
@@ -37,8 +38,10 @@
 public final class Daemons {
     private static final int NANOS_PER_MILLI = 1000 * 1000;
     private static final int NANOS_PER_SECOND = NANOS_PER_MILLI * 1000;
+    @UnsupportedAppUsage
     private static final long MAX_FINALIZE_NANOS = 10L * NANOS_PER_SECOND;
 
+    @UnsupportedAppUsage
     public static void start() {
         ReferenceQueueDaemon.INSTANCE.start();
         FinalizerDaemon.INSTANCE.start();
@@ -53,6 +56,7 @@
         HeapTaskDaemon.INSTANCE.startPostZygoteFork();
     }
 
+    @UnsupportedAppUsage
     public static void stop() {
         HeapTaskDaemon.INSTANCE.stop();
         ReferenceQueueDaemon.INSTANCE.stop();
@@ -66,6 +70,7 @@
      * single-threaded process when it forks.
      */
     private static abstract class Daemon implements Runnable {
+        @UnsupportedAppUsage
         private Thread thread;
         private String name;
         private boolean postZygoteFork;
@@ -74,6 +79,7 @@
             this.name = name;
         }
 
+        @UnsupportedAppUsage
         public synchronized void start() {
             startInternal();
         }
@@ -109,6 +115,7 @@
          * Returns true while the current thread should continue to run; false
          * when it should return.
          */
+        @UnsupportedAppUsage
         protected synchronized boolean isRunning() {
             return thread != null;
         }
@@ -128,6 +135,7 @@
          * Waits for the runtime thread to stop. This interrupts the thread
          * currently running the runnable and then waits for it to exit.
          */
+        @UnsupportedAppUsage
         public void stop() {
             Thread threadToStop;
             synchronized (this) {
@@ -163,6 +171,7 @@
      * pending list to the managed reference queue.
      */
     private static class ReferenceQueueDaemon extends Daemon {
+        @UnsupportedAppUsage
         private static final ReferenceQueueDaemon INSTANCE = new ReferenceQueueDaemon();
 
         ReferenceQueueDaemon() {
@@ -191,10 +200,12 @@
     }
 
     private static class FinalizerDaemon extends Daemon {
+        @UnsupportedAppUsage
         private static final FinalizerDaemon INSTANCE = new FinalizerDaemon();
         private final ReferenceQueue<Object> queue = FinalizerReference.queue;
         private final AtomicInteger progressCounter = new AtomicInteger(0);
         // Object (not reference!) being finalized. Accesses may race!
+        @UnsupportedAppUsage
         private Object finalizingObject = null;
 
         FinalizerDaemon() {
@@ -264,6 +275,7 @@
      * on one instance.
      */
     private static class FinalizerWatchdogDaemon extends Daemon {
+        @UnsupportedAppUsage
         private static final FinalizerWatchdogDaemon INSTANCE = new FinalizerWatchdogDaemon();
 
         private boolean needToWork = true;  // Only accessed in synchronized methods.
@@ -439,6 +451,7 @@
 
     // Adds a heap trim task to the heap event processor, not called from java. Left for
     // compatibility purposes due to reflection.
+    @UnsupportedAppUsage
     public static void requestHeapTrim() {
         VMRuntime.getRuntime().requestHeapTrim();
     }
diff --git a/luni/src/main/java/android/system/Int32Ref.java b/luni/src/main/java/android/system/Int32Ref.java
index 0d8645c..8f4a949 100644
--- a/luni/src/main/java/android/system/Int32Ref.java
+++ b/luni/src/main/java/android/system/Int32Ref.java
@@ -16,12 +16,15 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * @hide
  * A signed 32bit integer reference suitable for passing to lower-level system calls.
  */
 @libcore.api.CorePlatformApi
 public class Int32Ref {
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public int value;
 
diff --git a/luni/src/main/java/android/system/NetlinkSocketAddress.java b/luni/src/main/java/android/system/NetlinkSocketAddress.java
index d24a366..64b0eab 100644
--- a/luni/src/main/java/android/system/NetlinkSocketAddress.java
+++ b/luni/src/main/java/android/system/NetlinkSocketAddress.java
@@ -16,6 +16,7 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import libcore.util.Objects;
 import java.net.SocketAddress;
 
@@ -43,6 +44,7 @@
         this(nlPortId, 0);
     }
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public NetlinkSocketAddress(int nlPortId, int nlGroupsMask) {
         this.nlPortId = nlPortId;
diff --git a/luni/src/main/java/android/system/Os.java b/luni/src/main/java/android/system/Os.java
index 8553160..5baa8b0 100644
--- a/luni/src/main/java/android/system/Os.java
+++ b/luni/src/main/java/android/system/Os.java
@@ -16,6 +16,7 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.FileDescriptor;
 import java.io.InterruptedIOException;
 import java.net.InetAddress;
@@ -60,6 +61,7 @@
     public static void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { Libcore.os.bind(fd, address, port); }
 
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { Libcore.os.bind(fd, address); }
 
@@ -105,6 +107,7 @@
     public static void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { Libcore.os.connect(fd, address, port); }
 
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { Libcore.os.connect(fd, address); }
 
@@ -516,6 +519,7 @@
      * See <a href="http://man7.org/linux/man-pages/man2/sendto.2.html">sendto(2)</a>.
      * @hide
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, SocketAddress address) throws ErrnoException, SocketException { return Libcore.os.sendto(fd, bytes, byteOffset, byteCount, flags, address); }
 
@@ -569,6 +573,7 @@
     public static void setsockoptByte(FileDescriptor fd, int level, int option, int value) throws ErrnoException { Libcore.os.setsockoptByte(fd, level, option, value); }
 
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void setsockoptIfreq(FileDescriptor fd, int level, int option, String value) throws ErrnoException { Libcore.os.setsockoptIfreq(fd, level, option, value); }
 
@@ -588,7 +593,9 @@
     public static void setsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value) throws ErrnoException { Libcore.os.setsockoptLinger(fd, level, option, value); }
 
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
+    @libcore.api.IntraCoreApi
     public static void setsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value) throws ErrnoException { Libcore.os.setsockoptTimeval(fd, level, option, value); }
 
     /**
diff --git a/luni/src/main/java/android/system/OsConstants.java b/luni/src/main/java/android/system/OsConstants.java
index e2ed0da..32c877b 100644
--- a/luni/src/main/java/android/system/OsConstants.java
+++ b/luni/src/main/java/android/system/OsConstants.java
@@ -16,10 +16,13 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * Constants and helper functions for use with {@link Os}.
  */
 public final class OsConstants {
+    @UnsupportedAppUsage
     private OsConstants() {
     }
 
@@ -28,6 +31,7 @@
      * in.
      * @hide
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static int CAP_TO_INDEX(int x) { return x >>> 5; }
 
@@ -36,6 +40,7 @@
      * element, the index of which can be retrieved with CAP_TO_INDEX.
      * @hide
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static int CAP_TO_MASK(int x) { return 1 << (x & 31); }
 
@@ -112,9 +117,11 @@
     public static final int AF_INET = placeholder();
     public static final int AF_INET6 = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int AF_NETLINK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int AF_PACKET = placeholder();
     public static final int AF_UNIX = placeholder();
@@ -127,9 +134,11 @@
     public static final int AI_PASSIVE = placeholder();
     public static final int AI_V4MAPPED = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ARPHRD_ETHER = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int ARPHRD_LOOPBACK = placeholder();
     public static final int CAP_AUDIT_CONTROL = placeholder();
     public static final int CAP_AUDIT_WRITE = placeholder();
@@ -231,6 +240,7 @@
     public static final int ENOMEM = placeholder();
     public static final int ENOMSG = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ENONET = placeholder();
     public static final int ENOPROTOOPT = placeholder();
@@ -258,21 +268,26 @@
     public static final int ESRCH = placeholder();
     public static final int ESTALE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ETH_P_ALL = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ETH_P_ARP = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ETH_P_IP = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ETH_P_IPV6 = placeholder();
     public static final int ETIME = placeholder();
     public static final int ETIMEDOUT = placeholder();
     public static final int ETXTBSY = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int EUSERS = placeholder();
     // On Linux, EWOULDBLOCK == EAGAIN. Use EAGAIN instead, to reduce confusion.
@@ -300,15 +315,19 @@
     public static final int F_UNLCK = placeholder();
     public static final int F_WRLCK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ICMP_ECHO = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ICMP_ECHOREPLY = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ICMP6_ECHO_REQUEST = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int ICMP6_ECHO_REPLY = placeholder();
     public static final int IFA_F_DADFAILED = placeholder();
@@ -357,19 +376,23 @@
     public static final int IPV6_UNICAST_HOPS = placeholder();
     public static final int IPV6_V6ONLY = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int IP_MULTICAST_ALL = placeholder();
     public static final int IP_MULTICAST_IF = placeholder();
     public static final int IP_MULTICAST_LOOP = placeholder();
     public static final int IP_MULTICAST_TTL = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int IP_RECVTOS = placeholder();
     public static final int IP_TOS = placeholder();
     public static final int IP_TTL = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int _LINUX_CAPABILITY_VERSION_3 = placeholder();
     public static final int MAP_FIXED = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int MAP_POPULATE = placeholder();
     public static final int MAP_PRIVATE = placeholder();
@@ -393,9 +416,11 @@
     public static final int MS_INVALIDATE = placeholder();
     public static final int MS_SYNC = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int NETLINK_NETFILTER = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int NETLINK_ROUTE = placeholder();
     /**
@@ -414,6 +439,7 @@
     public static final int O_CLOEXEC = placeholder();
     public static final int O_CREAT = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int O_DIRECT = placeholder();
     public static final int O_EXCL = placeholder();
@@ -437,9 +463,11 @@
     public static final int POLLWRBAND = placeholder();
     public static final int POLLWRNORM = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int PR_CAP_AMBIENT = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int PR_CAP_AMBIENT_RAISE = placeholder();
     public static final int PR_GET_DUMPABLE = placeholder();
@@ -451,6 +479,7 @@
     public static final int PROT_WRITE = placeholder();
     public static final int R_OK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int RLIMIT_NOFILE = placeholder();
     public static final int RT_SCOPE_HOST = placeholder();
@@ -459,32 +488,45 @@
     public static final int RT_SCOPE_SITE = placeholder();
     public static final int RT_SCOPE_UNIVERSE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int RTMGRP_IPV4_IFADDR = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV4_MROUTE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV4_ROUTE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV4_RULE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV6_IFADDR = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV6_IFINFO = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV6_MROUTE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV6_PREFIX = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_IPV6_ROUTE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_LINK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int RTMGRP_NEIGH = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_NOTIFY = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int RTMGRP_TC = placeholder();
     public static final int SEEK_CUR = placeholder();
     public static final int SEEK_END = placeholder();
@@ -538,6 +580,7 @@
     public static final int SO_BROADCAST = placeholder();
     public static final int SO_DEBUG = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int SO_DOMAIN = placeholder();
     public static final int SO_DONTROUTE = placeholder();
     public static final int SO_ERROR = placeholder();
@@ -547,6 +590,7 @@
     public static final int SO_PASSCRED = placeholder();
     public static final int SO_PEERCRED = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int SO_PROTOCOL = placeholder();
     public static final int SO_RCVBUF = placeholder();
     public static final int SO_RCVLOWAT = placeholder();
@@ -557,11 +601,14 @@
     public static final int SO_SNDTIMEO = placeholder();
     public static final int SO_TYPE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int SPLICE_F_MOVE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int SPLICE_F_NONBLOCK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int SPLICE_F_MORE = placeholder();
     public static final int STDERR_FILENO = placeholder();
@@ -602,17 +649,22 @@
     public static final int TCP_NODELAY = placeholder();
     public static final int TCP_USER_TIMEOUT = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int TIOCOUTQ = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int UDP_ENCAP = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int UDP_ENCAP_ESPINUDP_NON_IKE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int UDP_ENCAP_ESPINUDP = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int UNIX_PATH_MAX = placeholder();
     public static final int WCONTINUED = placeholder();
     public static final int WEXITED = placeholder();
@@ -622,9 +674,11 @@
     public static final int WUNTRACED = placeholder();
     public static final int W_OK = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int XATTR_CREATE = placeholder();
     /** @hide */
+    @UnsupportedAppUsage
     public static final int XATTR_REPLACE = placeholder();
     public static final int X_OK = placeholder();
     public static final int _SC_2_CHAR_TERM = placeholder();
@@ -1004,9 +1058,11 @@
         return null;
     }
 
+    @UnsupportedAppUsage
     private static native void initConstants();
 
     // A hack to avoid these constants being inlined by javac...
+    @UnsupportedAppUsage
     private static int placeholder() { return 0; }
     // ...because we want to initialize them at runtime.
     static {
diff --git a/luni/src/main/java/android/system/PacketSocketAddress.java b/luni/src/main/java/android/system/PacketSocketAddress.java
index 6622272..d375226 100644
--- a/luni/src/main/java/android/system/PacketSocketAddress.java
+++ b/luni/src/main/java/android/system/PacketSocketAddress.java
@@ -16,6 +16,7 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import libcore.util.Objects;
 import java.net.SocketAddress;
 
@@ -54,12 +55,14 @@
     }
 
     /** Constructs a new PacketSocketAddress suitable for binding to. */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public PacketSocketAddress(short sll_protocol, int sll_ifindex) {
         this(sll_protocol, sll_ifindex, (short) 0, (byte) 0, null);
     }
 
     /** Constructs a new PacketSocketAddress suitable for sending to. */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public PacketSocketAddress(int sll_ifindex, byte[] sll_addr) {
         this((short) 0, sll_ifindex, (short) 0, (byte) 0, sll_addr);
diff --git a/luni/src/main/java/android/system/StructTimeval.java b/luni/src/main/java/android/system/StructTimeval.java
index 62e0390..e01cf91 100644
--- a/luni/src/main/java/android/system/StructTimeval.java
+++ b/luni/src/main/java/android/system/StructTimeval.java
@@ -16,6 +16,7 @@
 
 package android.system;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import libcore.util.Objects;
 
 /**
@@ -42,6 +43,7 @@
         this.tv_usec = tv_usec;
     }
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     @libcore.api.IntraCoreApi
     public static StructTimeval fromMillis(long millis) {
diff --git a/luni/src/main/java/java/lang/ref/FinalizerReference.java b/luni/src/main/java/java/lang/ref/FinalizerReference.java
index d7e803e..9589a9d 100644
--- a/luni/src/main/java/java/lang/ref/FinalizerReference.java
+++ b/luni/src/main/java/java/lang/ref/FinalizerReference.java
@@ -16,6 +16,7 @@
 
 package java.lang.ref;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import dalvik.annotation.optimization.FastNative;
 
 /**
@@ -23,6 +24,7 @@
  */
 public final class FinalizerReference<T> extends Reference<T> {
     // This queue contains those objects eligible for finalization.
+    @UnsupportedAppUsage
     public static final ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
 
     // Guards the list (not the queue).
@@ -30,10 +32,12 @@
 
     // This list contains a FinalizerReference for every finalizable object in the heap.
     // Objects in this list may or may not be eligible for finalization yet.
+    @UnsupportedAppUsage
     private static FinalizerReference<?> head = null;
 
     // The links used to construct the list.
     private FinalizerReference<?> prev;
+    @UnsupportedAppUsage
     private FinalizerReference<?> next;
 
     // When the GC wants something finalized, it moves it from the 'referent' field to
@@ -52,6 +56,7 @@
         zombie = null;
     }
 
+    @UnsupportedAppUsage
     public static void add(Object referent) {
         FinalizerReference<?> reference = new FinalizerReference<Object>(referent, queue);
         synchronized (LIST_LOCK) {
@@ -64,6 +69,7 @@
         }
     }
 
+    @UnsupportedAppUsage
     public static void remove(FinalizerReference<?> reference) {
         synchronized (LIST_LOCK) {
             FinalizerReference<?> next = reference.next;
diff --git a/luni/src/main/java/java/nio/NIOAccess.java b/luni/src/main/java/java/nio/NIOAccess.java
index 4094ef8..7a07e3d 100644
--- a/luni/src/main/java/java/nio/NIOAccess.java
+++ b/luni/src/main/java/java/nio/NIOAccess.java
@@ -16,6 +16,8 @@
 
 package java.nio;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * This class is used via JNI by code in frameworks/base/.
  * @hide
@@ -30,6 +32,7 @@
      * @hide
      */
     // @VisibleForTesting : was default
+    @UnsupportedAppUsage
     public static long getBasePointer(Buffer b) {
         long address = b.address;
         if (address == 0L) {
@@ -42,6 +45,7 @@
      * Returns the underlying Java array containing the data of the
      * given Buffer, or null if the Buffer is not backed by a Java array.
      */
+    @UnsupportedAppUsage
     static Object getBaseArray(Buffer b) {
         return b.hasArray() ? b.array() : null;
     }
@@ -53,6 +57,7 @@
      * account the Buffer's current position. This method is only
      * meaningful if getBaseArray() returns non-null.
      */
+    @UnsupportedAppUsage
     static int getBaseArrayOffset(Buffer b) {
         return b.hasArray() ? ((b.arrayOffset() + b.position) << b._elementSizeShift) : 0;
     }
diff --git a/luni/src/main/java/java/nio/NioUtils.java b/luni/src/main/java/java/nio/NioUtils.java
index cb91ae8..678382d 100644
--- a/luni/src/main/java/java/nio/NioUtils.java
+++ b/luni/src/main/java/java/nio/NioUtils.java
@@ -24,6 +24,7 @@
 import java.util.Set;
 
 import static android.system.OsConstants.*;
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import sun.misc.Cleaner;
 import sun.nio.ch.DirectBuffer;
 import sun.nio.ch.FileChannelImpl;
@@ -36,6 +37,7 @@
     private NioUtils() {
     }
 
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static void freeDirectBuffer(ByteBuffer buffer) {
         if (buffer == null) {
@@ -72,6 +74,7 @@
      * Exposes the array backing a non-direct ByteBuffer, even if the ByteBuffer is read-only.
      * Normally, attempting to access the array backing a read-only buffer throws.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static byte[] unsafeArray(ByteBuffer b) {
         return b.array();
@@ -81,6 +84,7 @@
      * Exposes the array offset for the array backing a non-direct ByteBuffer,
      * even if the ByteBuffer is read-only.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static int unsafeArrayOffset(ByteBuffer b) {
         return b.arrayOffset();
diff --git a/luni/src/main/java/libcore/icu/ICU.java b/luni/src/main/java/libcore/icu/ICU.java
index 7771bcd..8c40f64 100644
--- a/luni/src/main/java/libcore/icu/ICU.java
+++ b/luni/src/main/java/libcore/icu/ICU.java
@@ -16,6 +16,7 @@
 
 package libcore.icu;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -443,6 +444,7 @@
 
   public static native String getISO3Language(String languageTag);
 
+  @UnsupportedAppUsage
   @libcore.api.CorePlatformApi
   public static Locale addLikelySubtags(Locale locale) {
       return Locale.forLanguageTag(addLikelySubtags(locale.toLanguageTag()).replace('_', '-'));
@@ -451,6 +453,7 @@
   /**
    * @deprecated use {@link #addLikelySubtags(java.util.Locale)} instead.
    */
+  @UnsupportedAppUsage
   @Deprecated
   public static native String addLikelySubtags(String locale);
 
@@ -458,6 +461,7 @@
    * @deprecated use {@link java.util.Locale#getScript()} instead. This has been kept
    *     around only for the support library.
    */
+  @UnsupportedAppUsage
   @Deprecated
   public static native String getScript(String locale);
 
diff --git a/luni/src/main/java/libcore/io/ForwardingOs.java b/luni/src/main/java/libcore/io/ForwardingOs.java
index f8c8b45..c14b84f 100644
--- a/luni/src/main/java/libcore/io/ForwardingOs.java
+++ b/luni/src/main/java/libcore/io/ForwardingOs.java
@@ -47,6 +47,8 @@
 
 /**
  * Subclass this if you want to override some {@link Os} methods but otherwise delegate.
+ *
+ * @hide
  */
 @libcore.api.CorePlatformApi
 public class ForwardingOs implements Os {
diff --git a/luni/src/main/java/libcore/util/BasicLruCache.java b/luni/src/main/java/libcore/util/BasicLruCache.java
index 8cb0b41..6ba0bf2 100644
--- a/luni/src/main/java/libcore/util/BasicLruCache.java
+++ b/luni/src/main/java/libcore/util/BasicLruCache.java
@@ -16,6 +16,7 @@
 
 package libcore.util;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
@@ -26,6 +27,7 @@
  */
 @libcore.api.CorePlatformApi
 public class BasicLruCache<K, V> {
+    @UnsupportedAppUsage
     private final LinkedHashMap<K, V> map;
     private final int maxSize;
 
diff --git a/luni/src/main/java/libcore/util/TimeZoneFinder.java b/luni/src/main/java/libcore/util/TimeZoneFinder.java
index 39c3ad6..7efabf1 100644
--- a/luni/src/main/java/libcore/util/TimeZoneFinder.java
+++ b/luni/src/main/java/libcore/util/TimeZoneFinder.java
@@ -234,6 +234,7 @@
      * can return an empty list in a case when the underlying data files reference only unknown
      * zone IDs.
      */
+    @libcore.api.CorePlatformApi
     public List<TimeZone> lookupTimeZonesByCountry(String countryIso) {
         CountryTimeZones countryTimeZones = lookupCountryTimeZones(countryIso);
         return countryTimeZones == null ? null : countryTimeZones.getIcuTimeZones();
diff --git a/luni/src/main/java/libcore/util/ZoneInfo.java b/luni/src/main/java/libcore/util/ZoneInfo.java
index d938b68..60547b2 100644
--- a/luni/src/main/java/libcore/util/ZoneInfo.java
+++ b/luni/src/main/java/libcore/util/ZoneInfo.java
@@ -22,6 +22,7 @@
  */
 package libcore.util;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.util.Arrays;
@@ -132,6 +133,7 @@
      *
      * @see #mTypes
      */
+    @UnsupportedAppUsage
     private final long[] mTransitions;
 
     /**
@@ -699,6 +701,8 @@
      *
      * <p>All offsets are considered to be safe for addition / subtraction / multiplication without
      * worrying about overflow. All absolute time arithmetic is checked for overflow / underflow.
+     *
+     * @hide
      */
     @libcore.api.CorePlatformApi
     public static class WallTime {
@@ -720,6 +724,7 @@
         private int isDst;
         private int gmtOffsetSeconds;
 
+        @libcore.api.CorePlatformApi
         public WallTime() {
             this.calendar = new GregorianCalendar(0, 0, 0, 0, 0, 0);
             calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java b/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
index 0a03810..554807c 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
@@ -12,6 +12,7 @@
 
 package org.w3c.dom.ls;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.w3c.dom.traversal.NodeFilter;
 
 /**
@@ -60,6 +61,7 @@
      * <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
      * .
      */
+    @UnsupportedAppUsage
     public int getWhatToShow();
 
 }
diff --git a/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java b/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
index 12f6377..24f7599 100644
--- a/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
+++ b/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
@@ -12,6 +12,7 @@
 
 package org.w3c.dom.traversal;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.w3c.dom.Node;
 
 /**
@@ -141,6 +142,7 @@
      * @return A constant to determine whether the node is accepted,
      *   rejected, or skipped, as defined above.
      */
+    @UnsupportedAppUsage
     public short acceptNode(Node n);
 
 }
diff --git a/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java b/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
index f1fd5d0..686beb7 100644
--- a/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
+++ b/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
@@ -12,6 +12,7 @@
 
 package org.w3c.dom.traversal;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Node;
 
@@ -83,6 +84,7 @@
      *   INVALID_STATE_ERR: Raised if this method is called after the
      *   <code>detach</code> method was invoked.
      */
+    @UnsupportedAppUsage
     public Node nextNode()
                          throws DOMException;
 
@@ -106,6 +108,7 @@
      * or <code>previousNode</code> will raise the exception
      * INVALID_STATE_ERR.
      */
+    @UnsupportedAppUsage
     public void detach();
 
 }
diff --git a/luni/src/main/java/org/xml/sax/InputSource.java b/luni/src/main/java/org/xml/sax/InputSource.java
index b9b148e..3750cfe 100644
--- a/luni/src/main/java/org/xml/sax/InputSource.java
+++ b/luni/src/main/java/org/xml/sax/InputSource.java
@@ -5,6 +5,7 @@
 
 package org.xml.sax;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.InputStream;
 import java.io.Reader;
 
@@ -326,10 +327,15 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     private String publicId;
+    @UnsupportedAppUsage
     private String systemId;
+    @UnsupportedAppUsage
     private InputStream byteStream;
+    @UnsupportedAppUsage
     private String encoding;
+    @UnsupportedAppUsage
     private Reader characterStream;
 
 }
diff --git a/luni/src/main/java/org/xml/sax/SAXException.java b/luni/src/main/java/org/xml/sax/SAXException.java
index b8d0a9b..ea69d3f 100644
--- a/luni/src/main/java/org/xml/sax/SAXException.java
+++ b/luni/src/main/java/org/xml/sax/SAXException.java
@@ -5,6 +5,8 @@
 
 package org.xml.sax;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * Encapsulate a general SAX error or warning.
  *
@@ -144,6 +146,7 @@
     /**
      * @serial The embedded exception if tunnelling, or null.
      */
+    @UnsupportedAppUsage
     private Exception exception;
 
 }
diff --git a/luni/src/main/java/org/xml/sax/SAXParseException.java b/luni/src/main/java/org/xml/sax/SAXParseException.java
index 424f77b..72b16cf 100644
--- a/luni/src/main/java/org/xml/sax/SAXParseException.java
+++ b/luni/src/main/java/org/xml/sax/SAXParseException.java
@@ -5,6 +5,8 @@
 
 package org.xml.sax;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
+
 /**
  * Encapsulate an XML parse error or warning.
  *
@@ -163,6 +165,7 @@
      * @param lineNumber The line number of the error, or -1.
      * @param columnNumber The column number of the error, or -1.
      */
+    @UnsupportedAppUsage
     private void init (String publicId, String systemId,
                int lineNumber, int columnNumber)
     {
@@ -241,6 +244,7 @@
      * @serial The public identifier, or null.
      * @see #getPublicId
      */
+    @UnsupportedAppUsage
     private String publicId;
 
 
@@ -248,6 +252,7 @@
      * @serial The system identifier, or null.
      * @see #getSystemId
      */
+    @UnsupportedAppUsage
     private String systemId;
 
 
@@ -255,6 +260,7 @@
      * @serial The line number, or -1.
      * @see #getLineNumber
      */
+    @UnsupportedAppUsage
     private int lineNumber;
 
 
@@ -262,6 +268,7 @@
      * @serial The column number, or -1.
      * @see #getColumnNumber
      */
+    @UnsupportedAppUsage
     private int columnNumber;
 
 }
diff --git a/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java b/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
index 52fa1e5..b3702a4 100644
--- a/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
+++ b/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
@@ -5,6 +5,7 @@
 
 package org.xml.sax.ext;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import libcore.util.EmptyArray;
 import org.xml.sax.Attributes;
 import org.xml.sax.helpers.AttributesImpl;
@@ -37,7 +38,9 @@
  */
 public class Attributes2Impl extends AttributesImpl implements Attributes2
 {
+    @UnsupportedAppUsage
     private boolean[] declared;
+    @UnsupportedAppUsage
     private boolean[] specified;
 
 
diff --git a/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java b/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
index 9274d58..bb9582f 100644
--- a/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
+++ b/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
@@ -5,6 +5,7 @@
 
 package org.xml.sax.ext;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.xml.sax.Locator;
 import org.xml.sax.helpers.LocatorImpl;
 
@@ -26,7 +27,9 @@
  */
 public class Locator2Impl extends LocatorImpl implements Locator2
 {
+    @UnsupportedAppUsage
     private String    encoding;
+    @UnsupportedAppUsage
     private String    version;
 
 
diff --git a/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java b/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
index f6d5f85..9193075 100644
--- a/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
@@ -6,6 +6,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.xml.sax.Attributes;
 
 
@@ -563,6 +564,7 @@
      * @param n The minimum number of attributes that the array must
      *        be able to hold.
      */
+    @UnsupportedAppUsage
     private void ensureCapacity (int n)    {
         if (n <= 0) {
             return;
@@ -595,6 +597,7 @@
      * @param index The index to report.
      * @exception java.lang.ArrayIndexOutOfBoundsException Always.
      */
+    @UnsupportedAppUsage
     private void badIndex (int index)
     throws ArrayIndexOutOfBoundsException
     {
@@ -609,7 +612,9 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     int length;
+    @UnsupportedAppUsage
     String data [];
 
 }
diff --git a/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java b/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
index e7ec76a..944c41a 100644
--- a/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
@@ -5,6 +5,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import org.xml.sax.Locator;
 
 
@@ -204,9 +205,13 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     private String publicId;
+    @UnsupportedAppUsage
     private String systemId;
+    @UnsupportedAppUsage
     private int lineNumber;
+    @UnsupportedAppUsage
     private int columnNumber;
 
 }
diff --git a/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java b/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
index 5f96797..b68080a 100644
--- a/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
+++ b/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
@@ -6,6 +6,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EmptyStackException;
@@ -113,6 +114,7 @@
     /**
      * An empty enumeration.
      */
+    @UnsupportedAppUsage
     private static final Enumeration EMPTY_ENUMERATION = Collections.enumeration(Collections.emptyList());
 
 
@@ -517,9 +519,13 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     private Context contexts[];
+    @UnsupportedAppUsage
     private Context currentContext;
+    @UnsupportedAppUsage
     private int contextPos;
+    @UnsupportedAppUsage
     private boolean namespaceDeclUris;
 
 
diff --git a/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java b/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
index 9d1c683..56a79f9 100644
--- a/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
+++ b/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
@@ -6,6 +6,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Enumeration;
@@ -129,6 +130,7 @@
      * @exception java.lang.NullPointerException If the parser parameter
      *            is null.
      */
+    @UnsupportedAppUsage
     private void setup (Parser parser)
     {
     if (parser == null) {
@@ -697,6 +699,7 @@
     /**
      * Initialize the parser before each run.
      */
+    @UnsupportedAppUsage
     private void setupParser ()
     {
     // catch an illegal "nonsense" state.
@@ -734,6 +737,7 @@
      * @exception SAXException The client may throw
      *            an exception if there is an error callback.
      */
+    @UnsupportedAppUsage
     private String [] processName (String qName, boolean isAttribute,
                    boolean useException)
     throws SAXException
@@ -759,6 +763,7 @@
      * @exception SAXException The client may throw
      *            an exception.
      */
+    @UnsupportedAppUsage
     void reportError (String message)
     throws SAXException
     {
@@ -772,6 +777,7 @@
      *
      * @param message The error message.
      */
+    @UnsupportedAppUsage
     private SAXParseException makeException (String message)
     {
     if (locator != null) {
@@ -793,6 +799,7 @@
      * @exception SAXNotSupportedException If a
      *            document is currently being parsed.
      */
+    @UnsupportedAppUsage
     private void checkNotParsing (String type, String name)
     throws SAXNotSupportedException
     {
@@ -810,29 +817,43 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     private NamespaceSupport nsSupport;
+    @UnsupportedAppUsage
     private AttributeListAdapter attAdapter;
 
+    @UnsupportedAppUsage
     private boolean parsing = false;
+    @UnsupportedAppUsage
     private String nameParts[] = new String[3];
 
+    @UnsupportedAppUsage
     private Parser parser = null;
 
+    @UnsupportedAppUsage
     private AttributesImpl atts = null;
 
                 // Features
+    @UnsupportedAppUsage
     private boolean namespaces = true;
+    @UnsupportedAppUsage
     private boolean prefixes = false;
+    @UnsupportedAppUsage
     private boolean uris = false;
 
                 // Properties
 
                 // Handlers
+    @UnsupportedAppUsage
     Locator locator;
 
+    @UnsupportedAppUsage
     EntityResolver entityResolver = null;
+    @UnsupportedAppUsage
     DTDHandler dtdHandler = null;
+    @UnsupportedAppUsage
     ContentHandler contentHandler = null;
+    @UnsupportedAppUsage
     ErrorHandler errorHandler = null;
 
 
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java b/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
index 4b4dd71..95ae356 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
@@ -6,6 +6,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.IOException;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -683,6 +684,7 @@
      * non-null, and re-register the filter for all of the
      * events.</p>
      */
+    @UnsupportedAppUsage
     private void setupParse ()
     {
     if (parent == null) {
@@ -700,11 +702,17 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     private XMLReader parent = null;
+    @UnsupportedAppUsage
     private Locator locator = null;
+    @UnsupportedAppUsage
     private EntityResolver entityResolver = null;
+    @UnsupportedAppUsage
     private DTDHandler dtdHandler = null;
+    @UnsupportedAppUsage
     private ContentHandler contentHandler = null;
+    @UnsupportedAppUsage
     private ErrorHandler errorHandler = null;
 
 }
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java b/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
index c683229..0ef4d6f 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
@@ -6,6 +6,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.IOException;
 import java.util.Locale;
 import org.xml.sax.AttributeList;
@@ -95,6 +96,7 @@
      *
      * @param xmlReader The embedded XMLReader.
      */
+    @UnsupportedAppUsage
     private void setup (XMLReader xmlReader)
     {
     if (xmlReader == null) {
@@ -227,6 +229,7 @@
     /**
      * Set up the XML reader.
      */
+    @UnsupportedAppUsage
     private void setupXMLReader ()
     throws SAXException
     {
@@ -425,8 +428,11 @@
     // Internal state.
     ////////////////////////////////////////////////////////////////////
 
+    @UnsupportedAppUsage
     XMLReader xmlReader;
+    @UnsupportedAppUsage
     DocumentHandler documentHandler;
+    @UnsupportedAppUsage
     AttributesAdapter qAtts;
 
 
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java b/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
index 39dd367..b95728f 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
@@ -7,6 +7,7 @@
 
 package org.xml.sax.helpers;
 
+import dalvik.annotation.compat.UnsupportedAppUsage;
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -185,6 +186,7 @@
     return loadClass (NewInstance.getClassLoader (), className);
     }
 
+    @UnsupportedAppUsage
     private static XMLReader loadClass (ClassLoader loader, String className)
     throws SAXException
     {
diff --git a/luni/src/test/java/libcore/java/net/URLTest.java b/luni/src/test/java/libcore/java/net/URLTest.java
index 333594c..2daa09d 100644
--- a/luni/src/test/java/libcore/java/net/URLTest.java
+++ b/luni/src/test/java/libcore/java/net/URLTest.java
@@ -582,6 +582,26 @@
         assertEquals("http://host/a/c", url.toString()); // RI doesn't canonicalize
     }
 
+    public void testPathContainsBackslash() throws Exception {
+        URL url = new URL("http://host\\path@foo");
+        assertEquals("\\path@foo", url.getPath());
+        assertEquals("host", url.getHost());
+    }
+
+    public void testQueryContainsForwardSlash() throws Exception {
+        URL url = new URL("http://host?query/foo");
+        assertEquals("", url.getPath());
+        assertEquals("host", url.getHost());
+        assertEquals("query/foo", url.getQuery());
+    }
+
+    public void testFragmentContainsForwardSlash() throws Exception {
+        URL url = new URL("http://host#fragment/foo");
+        assertEquals("", url.getPath());
+        assertEquals("host", url.getHost());
+        assertEquals("fragment/foo", url.getRef());
+    }
+
     public void testRelativePathAndFragment() throws Exception {
         URL base = new URL("http://host/file");
         assertEquals("http://host/another#fragment", new URL(base, "another#fragment").toString());
diff --git a/mmodules/core_platform_api_client_demo/Android.bp b/mmodules/core_platform_api_client_demo/Android.bp
index c5d5015..8aaa0c8 100644
--- a/mmodules/core_platform_api_client_demo/Android.bp
+++ b/mmodules/core_platform_api_client_demo/Android.bp
@@ -18,6 +18,6 @@
 java_library {
     name: "core_platform_api_client_demo",
     srcs: ["src/main/java/**/*.java"],
-    sdk_version: "core_platform_current",
+    no_framework_libs: true,
 }
 
diff --git a/mmodules/intracoreapi/api/intra/current-api.txt b/mmodules/intracoreapi/api/intra/current-api.txt
index d31f02b..80c924d 100644
--- a/mmodules/intracoreapi/api/intra/current-api.txt
+++ b/mmodules/intracoreapi/api/intra/current-api.txt
@@ -4,6 +4,10 @@
     method public java.net.SocketException rethrowAsSocketException() throws java.net.SocketException;
   }
 
+  public final class Os {
+    method public static void setsockoptTimeval(java.io.FileDescriptor, int, int, android.system.StructTimeval) throws android.system.ErrnoException;
+  }
+
   public final class StructTimeval {
     method public static android.system.StructTimeval fromMillis(long);
     method public long toMillis();
@@ -13,6 +17,404 @@
 
 }
 
+package com.android.org.conscrypt {
+
+  public final class ClientSessionContext implements javax.net.ssl.SSLSessionContext {
+  }
+
+  public class DESEDESecretKeyFactory extends javax.crypto.SecretKeyFactorySpi {
+    ctor public DESEDESecretKeyFactory();
+  }
+
+  public final class DefaultSSLContextImpl extends com.android.org.conscrypt.OpenSSLContextImpl {
+    ctor public DefaultSSLContextImpl() throws java.security.GeneralSecurityException, java.io.IOException;
+  }
+
+  public class ECParameters extends java.security.AlgorithmParametersSpi {
+    ctor public ECParameters();
+  }
+
+  public final class GCMParameters extends java.security.AlgorithmParametersSpi {
+    ctor public GCMParameters();
+  }
+
+  public class IvParameters extends java.security.AlgorithmParametersSpi {
+    ctor public IvParameters();
+  }
+
+  public static class IvParameters.AES extends com.android.org.conscrypt.IvParameters {
+    ctor public IvParameters.AES();
+  }
+
+  public static class IvParameters.ChaCha20 extends com.android.org.conscrypt.IvParameters {
+    ctor public IvParameters.ChaCha20();
+  }
+
+  public static class IvParameters.DESEDE extends com.android.org.conscrypt.IvParameters {
+    ctor public IvParameters.DESEDE();
+  }
+
+  public abstract class KeyGeneratorImpl extends javax.crypto.KeyGeneratorSpi {
+  }
+
+  public static final class KeyGeneratorImpl.AES extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.AES();
+  }
+
+  public static final class KeyGeneratorImpl.ARC4 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.ARC4();
+  }
+
+  public static final class KeyGeneratorImpl.ChaCha20 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.ChaCha20();
+  }
+
+  public static final class KeyGeneratorImpl.DESEDE extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.DESEDE();
+  }
+
+  public static final class KeyGeneratorImpl.HmacMD5 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacMD5();
+  }
+
+  public static final class KeyGeneratorImpl.HmacSHA1 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacSHA1();
+  }
+
+  public static final class KeyGeneratorImpl.HmacSHA224 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacSHA224();
+  }
+
+  public static final class KeyGeneratorImpl.HmacSHA256 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacSHA256();
+  }
+
+  public static final class KeyGeneratorImpl.HmacSHA384 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacSHA384();
+  }
+
+  public static final class KeyGeneratorImpl.HmacSHA512 extends com.android.org.conscrypt.KeyGeneratorImpl {
+    ctor public KeyGeneratorImpl.HmacSHA512();
+  }
+
+  public class OAEPParameters extends java.security.AlgorithmParametersSpi {
+    ctor public OAEPParameters();
+  }
+
+  public abstract class OpenSSLCipher extends javax.crypto.CipherSpi {
+  }
+
+  public static abstract class OpenSSLCipher.EVP_AEAD extends com.android.org.conscrypt.OpenSSLCipher {
+  }
+
+  public static abstract class OpenSSLCipher.EVP_AEAD.AES extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD {
+  }
+
+  public static class OpenSSLCipher.EVP_AEAD.AES.GCM extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES {
+    ctor public OpenSSLCipher.EVP_AEAD.AES.GCM();
+  }
+
+  public static class OpenSSLCipher.EVP_AEAD.AES.GCM.AES_128 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES.GCM {
+    ctor public OpenSSLCipher.EVP_AEAD.AES.GCM.AES_128();
+  }
+
+  public static class OpenSSLCipher.EVP_AEAD.AES.GCM.AES_256 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES.GCM {
+    ctor public OpenSSLCipher.EVP_AEAD.AES.GCM.AES_256();
+  }
+
+  public static class OpenSSLCipher.EVP_AEAD.ChaCha20 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD {
+    ctor public OpenSSLCipher.EVP_AEAD.ChaCha20();
+  }
+
+  public static abstract class OpenSSLCipher.EVP_CIPHER extends com.android.org.conscrypt.OpenSSLCipher {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES.CBC.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES.CBC.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.CTR extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES.CTR();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES.ECB.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES.ECB.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128 {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_128.CBC.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_128.CBC.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128 {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_128.ECB.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_128.ECB.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256 {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_256.CBC.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_256.CBC.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256 {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_256.ECB.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.ECB {
+    ctor public OpenSSLCipher.EVP_CIPHER.AES_256.ECB.PKCS5Padding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.ARC4 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
+    ctor public OpenSSLCipher.EVP_CIPHER.ARC4();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.DESEDE extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE {
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.NoPadding();
+  }
+
+  public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE.CBC {
+    ctor public OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.PKCS5Padding();
+  }
+
+  public class OpenSSLCipherChaCha20 extends com.android.org.conscrypt.OpenSSLCipher {
+    ctor public OpenSSLCipherChaCha20();
+  }
+
+  public abstract class OpenSSLContextImpl extends javax.net.ssl.SSLContextSpi {
+  }
+
+  public static final class OpenSSLContextImpl.TLSv1 extends com.android.org.conscrypt.OpenSSLContextImpl {
+    ctor public OpenSSLContextImpl.TLSv1();
+  }
+
+  public static final class OpenSSLContextImpl.TLSv11 extends com.android.org.conscrypt.OpenSSLContextImpl {
+    ctor public OpenSSLContextImpl.TLSv11();
+  }
+
+  public static final class OpenSSLContextImpl.TLSv12 extends com.android.org.conscrypt.OpenSSLContextImpl {
+    ctor public OpenSSLContextImpl.TLSv12();
+  }
+
+  public static final class OpenSSLContextImpl.TLSv13 extends com.android.org.conscrypt.OpenSSLContextImpl {
+    ctor public OpenSSLContextImpl.TLSv13();
+  }
+
+  public final class OpenSSLECDHKeyAgreement extends javax.crypto.KeyAgreementSpi {
+    ctor public OpenSSLECDHKeyAgreement();
+  }
+
+  public final class OpenSSLECKeyFactory extends java.security.KeyFactorySpi {
+    ctor public OpenSSLECKeyFactory();
+  }
+
+  public final class OpenSSLECKeyPairGenerator extends java.security.KeyPairGenerator {
+    ctor public OpenSSLECKeyPairGenerator();
+  }
+
+  public abstract class OpenSSLMac extends javax.crypto.MacSpi {
+  }
+
+  public static final class OpenSSLMac.HmacMD5 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacMD5();
+  }
+
+  public static final class OpenSSLMac.HmacSHA1 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacSHA1();
+  }
+
+  public static final class OpenSSLMac.HmacSHA224 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacSHA224() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMac.HmacSHA256 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacSHA256() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMac.HmacSHA384 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacSHA384() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMac.HmacSHA512 extends com.android.org.conscrypt.OpenSSLMac {
+    ctor public OpenSSLMac.HmacSHA512();
+  }
+
+  public class OpenSSLMessageDigestJDK extends java.security.MessageDigestSpi implements java.lang.Cloneable {
+  }
+
+  public static final class OpenSSLMessageDigestJDK.MD5 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.MD5() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMessageDigestJDK.SHA1 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.SHA1() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMessageDigestJDK.SHA224 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.SHA224() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMessageDigestJDK.SHA256 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.SHA256() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMessageDigestJDK.SHA384 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.SHA384() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public static final class OpenSSLMessageDigestJDK.SHA512 extends com.android.org.conscrypt.OpenSSLMessageDigestJDK {
+    ctor public OpenSSLMessageDigestJDK.SHA512() throws java.security.NoSuchAlgorithmException;
+  }
+
+  public final class OpenSSLRSAKeyFactory extends java.security.KeyFactorySpi {
+    ctor public OpenSSLRSAKeyFactory();
+  }
+
+  public final class OpenSSLRSAKeyPairGenerator extends java.security.KeyPairGeneratorSpi {
+    ctor public OpenSSLRSAKeyPairGenerator();
+  }
+
+  public final class OpenSSLRandom extends java.security.SecureRandomSpi implements java.io.Serializable {
+    ctor public OpenSSLRandom();
+  }
+
+  public class OpenSSLSignature extends java.security.SignatureSpi {
+  }
+
+  public static final class OpenSSLSignature.MD5RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.MD5RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA1ECDSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA1ECDSA();
+  }
+
+  public static final class OpenSSLSignature.SHA1RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA1RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA1RSAPSS extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA1RSAPSS();
+  }
+
+  public static final class OpenSSLSignature.SHA224ECDSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA224ECDSA();
+  }
+
+  public static final class OpenSSLSignature.SHA224RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA224RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA224RSAPSS extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA224RSAPSS();
+  }
+
+  public static final class OpenSSLSignature.SHA256ECDSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA256ECDSA();
+  }
+
+  public static final class OpenSSLSignature.SHA256RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA256RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA256RSAPSS extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA256RSAPSS();
+  }
+
+  public static final class OpenSSLSignature.SHA384ECDSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA384ECDSA();
+  }
+
+  public static final class OpenSSLSignature.SHA384RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA384RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA384RSAPSS extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA384RSAPSS();
+  }
+
+  public static final class OpenSSLSignature.SHA512ECDSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA512ECDSA();
+  }
+
+  public static final class OpenSSLSignature.SHA512RSA extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA512RSA();
+  }
+
+  public static final class OpenSSLSignature.SHA512RSAPSS extends com.android.org.conscrypt.OpenSSLSignature {
+    ctor public OpenSSLSignature.SHA512RSAPSS();
+  }
+
+  public class OpenSSLSignatureRawECDSA extends java.security.SignatureSpi {
+    ctor public OpenSSLSignatureRawECDSA();
+  }
+
+  public final class OpenSSLSignatureRawRSA extends java.security.SignatureSpi {
+    ctor public OpenSSLSignatureRawRSA();
+  }
+
+  public class OpenSSLX509CertificateFactory extends java.security.cert.CertificateFactorySpi {
+    ctor public OpenSSLX509CertificateFactory();
+  }
+
+  public class PSSParameters extends java.security.AlgorithmParametersSpi {
+    ctor public PSSParameters();
+  }
+
+  public final class ServerSessionContext implements javax.net.ssl.SSLSessionContext {
+  }
+
+}
+
 package dalvik.system {
 
   public final class BlockGuard {
diff --git a/non_openjdk_java_files.bp b/non_openjdk_java_files.bp
index bf17bd1..4513c47 100644
--- a/non_openjdk_java_files.bp
+++ b/non_openjdk_java_files.bp
@@ -169,6 +169,7 @@
         "luni/src/main/java/libcore/internal/StringPool.java",
         "luni/src/main/java/libcore/io/DropBox.java",
         "luni/src/main/java/libcore/io/EventLogger.java",
+        "luni/src/main/java/libcore/io/ForwardingOs.java",
         "luni/src/main/java/libcore/io/IoBridge.java",
         "luni/src/main/java/libcore/io/IoUtils.java",
         "luni/src/main/java/libcore/io/Libcore.java",
@@ -299,7 +300,6 @@
         "luni/src/main/java/libcore/io/ClassPathURLStreamHandler.java",
         "luni/src/main/java/libcore/io/BlockGuardOs.java",
         "luni/src/main/java/libcore/io/BufferIterator.java",
-        "luni/src/main/java/libcore/io/ForwardingOs.java",
         "luni/src/main/java/libcore/io/IoTracker.java",
         "luni/src/main/java/libcore/io/Linux.java",
         "luni/src/main/java/libcore/io/MemoryMappedFile.java",
diff --git a/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java b/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java
new file mode 100644
index 0000000..11013ac
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.io;
+
+import java.nio.channels.FileChannel;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class FileInputStream extends java.io.InputStream {
+
+public FileInputStream(java.lang.String name) throws java.io.FileNotFoundException { throw new RuntimeException("Stub!"); }
+
+public FileInputStream(java.io.File file) throws java.io.FileNotFoundException { throw new RuntimeException("Stub!"); }
+
+public FileInputStream(java.io.FileDescriptor fdObj) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.CorePlatformApi
+public FileInputStream(java.io.FileDescriptor fdObj, boolean isFdOwner) { throw new RuntimeException("Stub!"); }
+
+public int read() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public int read(byte[] b) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public int read(byte[] b, int off, int len) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public long skip(long n) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public int available() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public void close() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public final java.io.FileDescriptor getFD() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public java.nio.channels.FileChannel getChannel() { throw new RuntimeException("Stub!"); }
+
+protected void finalize() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+}
+
diff --git a/ojluni/annotations/mmodule/java/lang/Class.annotated.java b/ojluni/annotations/mmodule/java/lang/Class.annotated.java
index 096a52b..fd80abb 100644
--- a/ojluni/annotations/mmodule/java/lang/Class.annotated.java
+++ b/ojluni/annotations/mmodule/java/lang/Class.annotated.java
@@ -83,6 +83,7 @@
 
 public java.lang.Package getPackage() { throw new RuntimeException("Stub!"); }
 
+@libcore.api.CorePlatformApi
 public java.lang.String getPackageName$() { throw new RuntimeException("Stub!"); }
 
 public java.lang.Class<?>[] getInterfaces() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/lang/Math.annotated.java b/ojluni/annotations/mmodule/java/lang/Math.annotated.java
new file mode 100644
index 0000000..46fae4e
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/lang/Math.annotated.java
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.lang;
+
+import java.util.Random;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public final class Math {
+
+Math() { throw new RuntimeException("Stub!"); }
+
+public static native double sin(double a);
+
+public static native double cos(double a);
+
+public static native double tan(double a);
+
+public static native double asin(double a);
+
+public static native double acos(double a);
+
+public static native double atan(double a);
+
+public static double toRadians(double angdeg) { throw new RuntimeException("Stub!"); }
+
+public static double toDegrees(double angrad) { throw new RuntimeException("Stub!"); }
+
+public static native double exp(double a);
+
+public static native double log(double a);
+
+public static native double log10(double a);
+
+public static native double sqrt(double a);
+
+public static native double cbrt(double a);
+
+public static native double IEEEremainder(double f1, double f2);
+
+public static native double ceil(double a);
+
+public static native double floor(double a);
+
+public static native double rint(double a);
+
+public static native double atan2(double y, double x);
+
+public static native double pow(double a, double b);
+
+public static int round(float a) { throw new RuntimeException("Stub!"); }
+
+public static long round(double a) { throw new RuntimeException("Stub!"); }
+
+public static double random() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.CorePlatformApi
+public static long randomLongInternal() { throw new RuntimeException("Stub!"); }
+
+public static int addExact(int x, int y) { throw new RuntimeException("Stub!"); }
+
+public static long addExact(long x, long y) { throw new RuntimeException("Stub!"); }
+
+public static int subtractExact(int x, int y) { throw new RuntimeException("Stub!"); }
+
+public static long subtractExact(long x, long y) { throw new RuntimeException("Stub!"); }
+
+public static int multiplyExact(int x, int y) { throw new RuntimeException("Stub!"); }
+
+public static long multiplyExact(long x, long y) { throw new RuntimeException("Stub!"); }
+
+public static int incrementExact(int a) { throw new RuntimeException("Stub!"); }
+
+public static long incrementExact(long a) { throw new RuntimeException("Stub!"); }
+
+public static int decrementExact(int a) { throw new RuntimeException("Stub!"); }
+
+public static long decrementExact(long a) { throw new RuntimeException("Stub!"); }
+
+public static int negateExact(int a) { throw new RuntimeException("Stub!"); }
+
+public static long negateExact(long a) { throw new RuntimeException("Stub!"); }
+
+public static int toIntExact(long value) { throw new RuntimeException("Stub!"); }
+
+public static int floorDiv(int x, int y) { throw new RuntimeException("Stub!"); }
+
+public static long floorDiv(long x, long y) { throw new RuntimeException("Stub!"); }
+
+public static int floorMod(int x, int y) { throw new RuntimeException("Stub!"); }
+
+public static long floorMod(long x, long y) { throw new RuntimeException("Stub!"); }
+
+public static int abs(int a) { throw new RuntimeException("Stub!"); }
+
+public static long abs(long a) { throw new RuntimeException("Stub!"); }
+
+public static float abs(float a) { throw new RuntimeException("Stub!"); }
+
+public static double abs(double a) { throw new RuntimeException("Stub!"); }
+
+public static int max(int a, int b) { throw new RuntimeException("Stub!"); }
+
+public static long max(long a, long b) { throw new RuntimeException("Stub!"); }
+
+public static float max(float a, float b) { throw new RuntimeException("Stub!"); }
+
+public static double max(double a, double b) { throw new RuntimeException("Stub!"); }
+
+public static int min(int a, int b) { throw new RuntimeException("Stub!"); }
+
+public static long min(long a, long b) { throw new RuntimeException("Stub!"); }
+
+public static float min(float a, float b) { throw new RuntimeException("Stub!"); }
+
+public static double min(double a, double b) { throw new RuntimeException("Stub!"); }
+
+public static double ulp(double d) { throw new RuntimeException("Stub!"); }
+
+public static float ulp(float f) { throw new RuntimeException("Stub!"); }
+
+public static double signum(double d) { throw new RuntimeException("Stub!"); }
+
+public static float signum(float f) { throw new RuntimeException("Stub!"); }
+
+public static native double sinh(double x);
+
+public static native double cosh(double x);
+
+public static native double tanh(double x);
+
+public static native double hypot(double x, double y);
+
+public static native double expm1(double x);
+
+public static native double log1p(double x);
+
+public static double copySign(double magnitude, double sign) { throw new RuntimeException("Stub!"); }
+
+public static float copySign(float magnitude, float sign) { throw new RuntimeException("Stub!"); }
+
+public static int getExponent(float f) { throw new RuntimeException("Stub!"); }
+
+public static int getExponent(double d) { throw new RuntimeException("Stub!"); }
+
+public static double nextAfter(double start, double direction) { throw new RuntimeException("Stub!"); }
+
+public static float nextAfter(float start, double direction) { throw new RuntimeException("Stub!"); }
+
+public static double nextUp(double d) { throw new RuntimeException("Stub!"); }
+
+public static float nextUp(float f) { throw new RuntimeException("Stub!"); }
+
+public static double nextDown(double d) { throw new RuntimeException("Stub!"); }
+
+public static float nextDown(float f) { throw new RuntimeException("Stub!"); }
+
+public static double scalb(double d, int scaleFactor) { throw new RuntimeException("Stub!"); }
+
+public static float scalb(float f, int scaleFactor) { throw new RuntimeException("Stub!"); }
+
+public static final double E = 2.718281828459045;
+
+public static final double PI = 3.141592653589793;
+}
+
diff --git a/ojluni/annotations/mmodule/java/lang/Thread.annotated.java b/ojluni/annotations/mmodule/java/lang/Thread.annotated.java
new file mode 100644
index 0000000..2499518
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/lang/Thread.annotated.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.lang;
+
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.util.Map;
+import java.util.concurrent.locks.LockSupport;
+import java.lang.ref.Reference;
+import java.lang.ref.WeakReference;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class Thread implements java.lang.Runnable {
+
+public Thread() { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.Runnable target) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.ThreadGroup group, java.lang.Runnable target) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.String name) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.ThreadGroup group, java.lang.String name) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name) { throw new RuntimeException("Stub!"); }
+
+public Thread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize) { throw new RuntimeException("Stub!"); }
+
+public static native java.lang.Thread currentThread();
+
+public static native void yield();
+
+public static void sleep(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
+
+public static void sleep(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
+
+protected java.lang.Object clone() throws java.lang.CloneNotSupportedException { throw new RuntimeException("Stub!"); }
+
+public synchronized void start() { throw new RuntimeException("Stub!"); }
+
+public void run() { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+public final void stop() { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+public final synchronized void stop(java.lang.Throwable obj) { throw new RuntimeException("Stub!"); }
+
+public void interrupt() { throw new RuntimeException("Stub!"); }
+
+public static native boolean interrupted();
+
+public native boolean isInterrupted();
+
+@Deprecated
+public void destroy() { throw new RuntimeException("Stub!"); }
+
+public final boolean isAlive() { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+public final void suspend() { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+public final void resume() { throw new RuntimeException("Stub!"); }
+
+public final void setPriority(int newPriority) { throw new RuntimeException("Stub!"); }
+
+public final int getPriority() { throw new RuntimeException("Stub!"); }
+
+public final synchronized void setName(java.lang.String name) { throw new RuntimeException("Stub!"); }
+
+public final java.lang.String getName() { throw new RuntimeException("Stub!"); }
+
+public final java.lang.ThreadGroup getThreadGroup() { throw new RuntimeException("Stub!"); }
+
+public static int activeCount() { throw new RuntimeException("Stub!"); }
+
+public static int enumerate(java.lang.Thread[] tarray) { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+public int countStackFrames() { throw new RuntimeException("Stub!"); }
+
+public final void join(long millis) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
+
+public final void join(long millis, int nanos) throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
+
+public final void join() throws java.lang.InterruptedException { throw new RuntimeException("Stub!"); }
+
+public static void dumpStack() { throw new RuntimeException("Stub!"); }
+
+public final void setDaemon(boolean on) { throw new RuntimeException("Stub!"); }
+
+public final boolean isDaemon() { throw new RuntimeException("Stub!"); }
+
+public final void checkAccess() { throw new RuntimeException("Stub!"); }
+
+public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+public java.lang.ClassLoader getContextClassLoader() { throw new RuntimeException("Stub!"); }
+
+public void setContextClassLoader(java.lang.ClassLoader cl) { throw new RuntimeException("Stub!"); }
+
+public static native boolean holdsLock(java.lang.Object obj);
+
+public java.lang.StackTraceElement[] getStackTrace() { throw new RuntimeException("Stub!"); }
+
+public static java.util.Map<java.lang.Thread,java.lang.StackTraceElement[]> getAllStackTraces() { throw new RuntimeException("Stub!"); }
+
+public long getId() { throw new RuntimeException("Stub!"); }
+
+public java.lang.Thread.State getState() { throw new RuntimeException("Stub!"); }
+
+public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
+
+public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.CorePlatformApi
+public static void setUncaughtExceptionPreHandler(UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.CorePlatformApi
+public static UncaughtExceptionHandler getUncaughtExceptionPreHandler() { throw new RuntimeException("Stub!"); }
+
+public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); }
+
+public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
+
+public static final int MAX_PRIORITY = 10; // 0xa
+
+public static final int MIN_PRIORITY = 1; // 0x1
+
+public static final int NORM_PRIORITY = 5; // 0x5
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public static enum State {
+NEW,
+RUNNABLE,
+BLOCKED,
+WAITING,
+TIMED_WAITING,
+TERMINATED;
+}
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+@java.lang.FunctionalInterface
+public static interface UncaughtExceptionHandler {
+
+public void uncaughtException(java.lang.Thread t, java.lang.Throwable e);
+}
+
+}
+
diff --git a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
index 1183173..54b6fd0 100644
--- a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
@@ -87,6 +87,8 @@
 
 public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException { throw new RuntimeException("Stub!"); }
 
+@libcore.api.CorePlatformApi
+@libcore.api.IntraCoreApi
 public static boolean isNumeric(java.lang.String address) { throw new RuntimeException("Stub!"); }
 
 @libcore.api.CorePlatformApi
diff --git a/ojluni/annotations/mmodule/java/net/InetSocketAddress.annotated.java b/ojluni/annotations/mmodule/java/net/InetSocketAddress.annotated.java
new file mode 100644
index 0000000..554b8e3
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/net/InetSocketAddress.annotated.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.net;
+
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class InetSocketAddress extends java.net.SocketAddress {
+
+@libcore.api.CorePlatformApi
+public InetSocketAddress() { throw new RuntimeException("Stub!"); }
+
+public InetSocketAddress(int port) { throw new RuntimeException("Stub!"); }
+
+public InetSocketAddress(java.net.InetAddress addr, int port) { throw new RuntimeException("Stub!"); }
+
+public InetSocketAddress(java.lang.String hostname, int port) { throw new RuntimeException("Stub!"); }
+
+public static java.net.InetSocketAddress createUnresolved(java.lang.String host, int port) { throw new RuntimeException("Stub!"); }
+
+public final int getPort() { throw new RuntimeException("Stub!"); }
+
+public final java.net.InetAddress getAddress() { throw new RuntimeException("Stub!"); }
+
+public final java.lang.String getHostName() { throw new RuntimeException("Stub!"); }
+
+public final java.lang.String getHostString() { throw new RuntimeException("Stub!"); }
+
+public final boolean isUnresolved() { throw new RuntimeException("Stub!"); }
+
+public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+public final boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+
+public final int hashCode() { throw new RuntimeException("Stub!"); }
+}
+
diff --git a/ojluni/annotations/mmodule/java/java/net/ServerSocket.annotated.java b/ojluni/annotations/mmodule/java/net/ServerSocket.annotated.java
similarity index 100%
rename from ojluni/annotations/mmodule/java/java/net/ServerSocket.annotated.java
rename to ojluni/annotations/mmodule/java/net/ServerSocket.annotated.java
diff --git a/ojluni/annotations/mmodule/java/net/Socket.annotated.java b/ojluni/annotations/mmodule/java/net/Socket.annotated.java
index b91f52f..e021788 100644
--- a/ojluni/annotations/mmodule/java/net/Socket.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/Socket.annotated.java
@@ -140,6 +140,7 @@
 public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { throw new RuntimeException("Stub!"); }
 
 @libcore.api.CorePlatformApi
+@libcore.api.IntraCoreApi
 public java.io.FileDescriptor getFileDescriptor$() { throw new RuntimeException("Stub!"); }
 }
 
diff --git a/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
new file mode 100644
index 0000000..ab1f94e
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.net;
+
+import java.io.IOException;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public abstract class SocketImpl implements java.net.SocketOptions {
+
+public SocketImpl() { throw new RuntimeException("Stub!"); }
+
+protected abstract void create(boolean stream) throws java.io.IOException;
+
+protected abstract void connect(java.lang.String host, int port) throws java.io.IOException;
+
+protected abstract void connect(java.net.InetAddress address, int port) throws java.io.IOException;
+
+protected abstract void connect(java.net.SocketAddress address, int timeout) throws java.io.IOException;
+
+protected abstract void bind(java.net.InetAddress host, int port) throws java.io.IOException;
+
+protected abstract void listen(int backlog) throws java.io.IOException;
+
+protected abstract void accept(java.net.SocketImpl s) throws java.io.IOException;
+
+protected abstract java.io.InputStream getInputStream() throws java.io.IOException;
+
+protected abstract java.io.OutputStream getOutputStream() throws java.io.IOException;
+
+protected abstract int available() throws java.io.IOException;
+
+protected abstract void close() throws java.io.IOException;
+
+protected void shutdownInput() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+protected void shutdownOutput() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+protected java.io.FileDescriptor getFileDescriptor() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.CorePlatformApi
+public FileDescriptor getFD$() { throw new RuntimeException("Stub!"); }
+
+protected java.net.InetAddress getInetAddress() { throw new RuntimeException("Stub!"); }
+
+protected int getPort() { throw new RuntimeException("Stub!"); }
+
+protected boolean supportsUrgentData() { throw new RuntimeException("Stub!"); }
+
+protected abstract void sendUrgentData(int data) throws java.io.IOException;
+
+protected int getLocalPort() { throw new RuntimeException("Stub!"); }
+
+public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+protected void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { throw new RuntimeException("Stub!"); }
+
+protected java.net.InetAddress address;
+
+protected java.io.FileDescriptor fd;
+
+protected int localport;
+
+protected int port;
+}
+
diff --git a/ojluni/annotations/mmodule/java/security/spec/ECParameterSpec.annotated.java b/ojluni/annotations/mmodule/java/security/spec/ECParameterSpec.annotated.java
new file mode 100644
index 0000000..926ee08
--- /dev/null
+++ b/ojluni/annotations/mmodule/java/security/spec/ECParameterSpec.annotated.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.security.spec;
+
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class ECParameterSpec implements java.security.spec.AlgorithmParameterSpec {
+
+public ECParameterSpec(java.security.spec.EllipticCurve curve, java.security.spec.ECPoint g, java.math.BigInteger n, int h) { throw new RuntimeException("Stub!"); }
+
+public java.security.spec.EllipticCurve getCurve() { throw new RuntimeException("Stub!"); }
+
+public java.security.spec.ECPoint getGenerator() { throw new RuntimeException("Stub!"); }
+
+public java.math.BigInteger getOrder() { throw new RuntimeException("Stub!"); }
+
+public int getCofactor() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.IntraCoreApi
+public void setCurveName(String curveName) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.IntraCoreApi
+public String getCurveName() { throw new RuntimeException("Stub!"); }
+}
+
diff --git a/ojluni/annotations/sdk/nullability/java/io/ByteArrayOutputStream.annotated.java b/ojluni/annotations/sdk/nullability/java/io/ByteArrayOutputStream.annotated.java
new file mode 100644
index 0000000..3fdca11
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/io/ByteArrayOutputStream.annotated.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.io;
+
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class ByteArrayOutputStream extends java.io.OutputStream {
+
+public ByteArrayOutputStream() { throw new RuntimeException("Stub!"); }
+
+public ByteArrayOutputStream(int size) { throw new RuntimeException("Stub!"); }
+
+public synchronized void write(int b) { throw new RuntimeException("Stub!"); }
+
+public synchronized void write(byte @libcore.util.NonNull [] b, int off, int len) { throw new RuntimeException("Stub!"); }
+
+public synchronized void writeTo(@libcore.util.NonNull java.io.OutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public synchronized void reset() { throw new RuntimeException("Stub!"); }
+
+public synchronized byte @libcore.util.NonNull [] toByteArray() { throw new RuntimeException("Stub!"); }
+
+public synchronized int size() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public synchronized java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public synchronized java.lang.String toString(@libcore.util.NonNull java.lang.String charsetName) throws java.io.UnsupportedEncodingException { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+@libcore.util.NonNull public synchronized java.lang.String toString(int hibyte) { throw new RuntimeException("Stub!"); }
+
+public void close() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+protected byte @libcore.util.NonNull [] buf;
+
+protected int count;
+}
diff --git a/ojluni/annotations/sdk/nullability/java/io/File.annotated.java b/ojluni/annotations/sdk/nullability/java/io/File.annotated.java
new file mode 100644
index 0000000..497c434
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/io/File.annotated.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.io;
+
+import java.nio.file.Path;
+import java.net.URI;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.file.FileSystems;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class File implements java.io.Serializable, java.lang.Comparable<java.io.File> {
+
+public File(@libcore.util.NonNull java.lang.String pathname) { throw new RuntimeException("Stub!"); }
+
+public File(@libcore.util.Nullable java.lang.String parent, @libcore.util.NonNull java.lang.String child) { throw new RuntimeException("Stub!"); }
+
+public File(@libcore.util.Nullable java.io.File parent, @libcore.util.NonNull java.lang.String child) { throw new RuntimeException("Stub!"); }
+
+public File(@libcore.util.NonNull java.net.URI uri) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String getName() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.lang.String getParent() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.io.File getParentFile() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String getPath() { throw new RuntimeException("Stub!"); }
+
+public boolean isAbsolute() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String getAbsolutePath() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.io.File getAbsoluteFile() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String getCanonicalPath() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.io.File getCanonicalFile() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@Deprecated
+@libcore.util.NonNull public java.net.URL toURL() throws java.net.MalformedURLException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.net.URI toURI() { throw new RuntimeException("Stub!"); }
+
+public boolean canRead() { throw new RuntimeException("Stub!"); }
+
+public boolean canWrite() { throw new RuntimeException("Stub!"); }
+
+public boolean exists() { throw new RuntimeException("Stub!"); }
+
+public boolean isDirectory() { throw new RuntimeException("Stub!"); }
+
+public boolean isFile() { throw new RuntimeException("Stub!"); }
+
+public boolean isHidden() { throw new RuntimeException("Stub!"); }
+
+public long lastModified() { throw new RuntimeException("Stub!"); }
+
+public long length() { throw new RuntimeException("Stub!"); }
+
+public boolean createNewFile() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public boolean delete() { throw new RuntimeException("Stub!"); }
+
+public void deleteOnExit() { throw new RuntimeException("Stub!"); }
+
+public java.lang.@libcore.util.NonNull String @libcore.util.Nullable [] list() { throw new RuntimeException("Stub!"); }
+
+public java.lang.@libcore.util.NonNull String @libcore.util.Nullable [] list(@libcore.util.Nullable java.io.FilenameFilter filter) { throw new RuntimeException("Stub!"); }
+
+public java.io.@libcore.util.NonNull File @libcore.util.Nullable [] listFiles() { throw new RuntimeException("Stub!"); }
+
+public java.io.@libcore.util.NonNull File @libcore.util.Nullable [] listFiles(@libcore.util.Nullable java.io.FilenameFilter filter) { throw new RuntimeException("Stub!"); }
+
+public java.io.@libcore.util.NonNull File @libcore.util.Nullable [] listFiles(@libcore.util.Nullable java.io.FileFilter filter) { throw new RuntimeException("Stub!"); }
+
+public boolean mkdir() { throw new RuntimeException("Stub!"); }
+
+public boolean mkdirs() { throw new RuntimeException("Stub!"); }
+
+public boolean renameTo(@libcore.util.NonNull java.io.File dest) { throw new RuntimeException("Stub!"); }
+
+public boolean setLastModified(long time) { throw new RuntimeException("Stub!"); }
+
+public boolean setReadOnly() { throw new RuntimeException("Stub!"); }
+
+public boolean setWritable(boolean writable, boolean ownerOnly) { throw new RuntimeException("Stub!"); }
+
+public boolean setWritable(boolean writable) { throw new RuntimeException("Stub!"); }
+
+public boolean setReadable(boolean readable, boolean ownerOnly) { throw new RuntimeException("Stub!"); }
+
+public boolean setReadable(boolean readable) { throw new RuntimeException("Stub!"); }
+
+public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new RuntimeException("Stub!"); }
+
+public boolean setExecutable(boolean executable) { throw new RuntimeException("Stub!"); }
+
+public boolean canExecute() { throw new RuntimeException("Stub!"); }
+
+public static java.io.@libcore.util.NonNull File @libcore.util.NonNull [] listRoots() { throw new RuntimeException("Stub!"); }
+
+public long getTotalSpace() { throw new RuntimeException("Stub!"); }
+
+public long getFreeSpace() { throw new RuntimeException("Stub!"); }
+
+public long getUsableSpace() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.io.File createTempFile(@libcore.util.NonNull java.lang.String prefix, @libcore.util.Nullable java.lang.String suffix, @libcore.util.Nullable java.io.File directory) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.io.File createTempFile(@libcore.util.NonNull java.lang.String prefix, @libcore.util.Nullable java.lang.String suffix) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+public int compareTo(@libcore.util.NonNull java.io.File pathname) { throw new RuntimeException("Stub!"); }
+
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+
+public int hashCode() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.file.Path toPath() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.lang.String pathSeparator;
+static { pathSeparator = null; }
+
+public static final char pathSeparatorChar;
+static { pathSeparatorChar = 0; }
+
+@libcore.util.NonNull public static final java.lang.String separator;
+static { separator = null; }
+
+public static final char separatorChar;
+static { separatorChar = 0; }
+}
diff --git a/ojluni/annotations/sdk/nullability/java/lang/Throwable.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/Throwable.annotated.java
new file mode 100644
index 0000000..f6cef0c
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/lang/Throwable.annotated.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package java.lang;
+
+import java.io.*;
+import java.util.*;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class Throwable implements java.io.Serializable {
+
+public Throwable() { throw new RuntimeException("Stub!"); }
+
+public Throwable(@libcore.util.Nullable java.lang.String message) { throw new RuntimeException("Stub!"); }
+
+public Throwable(@libcore.util.Nullable java.lang.String message, @libcore.util.Nullable java.lang.Throwable cause) { throw new RuntimeException("Stub!"); }
+
+public Throwable(@libcore.util.Nullable java.lang.Throwable cause) { throw new RuntimeException("Stub!"); }
+
+protected Throwable(@libcore.util.Nullable java.lang.String message, @libcore.util.Nullable java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.lang.String getMessage() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.lang.String getLocalizedMessage() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public synchronized java.lang.Throwable getCause() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public synchronized java.lang.Throwable initCause(@libcore.util.Nullable java.lang.Throwable cause) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+public void printStackTrace() { throw new RuntimeException("Stub!"); }
+
+public void printStackTrace(@libcore.util.NonNull java.io.PrintStream s) { throw new RuntimeException("Stub!"); }
+
+public void printStackTrace(@libcore.util.NonNull java.io.PrintWriter s) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public synchronized java.lang.Throwable fillInStackTrace() { throw new RuntimeException("Stub!"); }
+
+public java.lang.@libcore.util.NonNull StackTraceElement @libcore.util.NonNull [] getStackTrace() { throw new RuntimeException("Stub!"); }
+
+public void setStackTrace(java.lang.@libcore.util.NonNull StackTraceElement @libcore.util.NonNull [] stackTrace) { throw new RuntimeException("Stub!"); }
+
+public final synchronized void addSuppressed(@libcore.util.NonNull java.lang.Throwable exception) { throw new RuntimeException("Stub!"); }
+
+public final synchronized java.lang.@libcore.util.NonNull Throwable @libcore.util.NonNull [] getSuppressed() { throw new RuntimeException("Stub!"); }
+}
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/AccessibleObject.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/AccessibleObject.annotated.java
index 4846fc7..f601635 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/AccessibleObject.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/AccessibleObject.annotated.java
@@ -39,17 +39,17 @@
 
 public boolean isAccessible() { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
+public boolean isAnnotationPresent(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotations() { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAnnotations() { throw new RuntimeException("Stub!"); }
 }
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/AnnotatedElement.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/AnnotatedElement.annotated.java
index b6f67b7..97cb3a2 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/AnnotatedElement.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/AnnotatedElement.annotated.java
@@ -33,17 +33,17 @@
 @SuppressWarnings({"unchecked", "deprecation", "all"})
 public interface AnnotatedElement {
 
-public default boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
+public default boolean isAnnotationPresent(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass);
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass);
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotations();
 
-public default <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public default <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public default <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public default <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public default <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public default <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAnnotations();
 }
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Array.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Array.annotated.java
index fb09931..f0fba5c 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Array.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Array.annotated.java
@@ -33,46 +33,45 @@
 
 Array() { throw new RuntimeException("Stub!"); }
 
-@libcore.util.NonNull public static java.lang.Object newInstance(java.lang.Class<?> componentType, int length) throws java.lang.NegativeArraySizeException { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static java.lang.Object newInstance(@libcore.util.NonNull java.lang.Class<?> componentType, int length) throws java.lang.NegativeArraySizeException { throw new RuntimeException("Stub!"); }
 
-@libcore.util.NonNull public static java.lang.Object newInstance(java.lang.Class<?> componentType, int... dimensions) throws java.lang.IllegalArgumentException, java.lang.NegativeArraySizeException { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static java.lang.Object newInstance(@libcore.util.NonNull java.lang.Class<?> componentType, int... dimensions) throws java.lang.IllegalArgumentException, java.lang.NegativeArraySizeException { throw new RuntimeException("Stub!"); }
 
-public static int getLength(java.lang.Object array) { throw new RuntimeException("Stub!"); }
+public static int getLength(@libcore.util.NonNull java.lang.Object array) { throw new RuntimeException("Stub!"); }
 
-public static java.lang.Object get(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public static java.lang.Object get(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static boolean getBoolean(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static boolean getBoolean(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static byte getByte(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static byte getByte(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static char getChar(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static char getChar(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static short getShort(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static short getShort(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static int getInt(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static int getInt(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static long getLong(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static long getLong(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static float getFloat(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static float getFloat(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static double getDouble(java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static double getDouble(@libcore.util.NonNull java.lang.Object array, int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void set(java.lang.Object array, int index, java.lang.Object value) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void set(@libcore.util.NonNull java.lang.Object array, int index, @libcore.util.Nullable java.lang.Object value) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setBoolean(java.lang.Object array, int index, boolean z) { throw new RuntimeException("Stub!"); }
+public static void setBoolean(@libcore.util.NonNull java.lang.Object array, int index, boolean z) { throw new RuntimeException("Stub!"); }
 
-public static void setByte(java.lang.Object array, int index, byte b) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setByte(@libcore.util.NonNull java.lang.Object array, int index, byte b) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setChar(java.lang.Object array, int index, char c) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setChar(@libcore.util.NonNull java.lang.Object array, int index, char c) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setShort(java.lang.Object array, int index, short s) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setShort(@libcore.util.NonNull java.lang.Object array, int index, short s) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setInt(java.lang.Object array, int index, int i) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setInt(@libcore.util.NonNull java.lang.Object array, int index, int i) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setLong(java.lang.Object array, int index, long l) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setLong(@libcore.util.NonNull java.lang.Object array, int index, long l) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setFloat(java.lang.Object array, int index, float f) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setFloat(@libcore.util.NonNull java.lang.Object array, int index, float f) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static void setDouble(java.lang.Object array, int index, double d) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+public static void setDouble(@libcore.util.NonNull java.lang.Object array, int index, double d) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 }
-
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Constructor.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Constructor.annotated.java
index 2ebfbe6..58bd810 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Constructor.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Constructor.annotated.java
@@ -51,7 +51,7 @@
 
 public java.lang.reflect.Type[] getGenericExceptionTypes() { throw new RuntimeException("Stub!"); }
 
-public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
 
 public int hashCode() { throw new RuntimeException("Stub!"); }
 
@@ -65,7 +65,7 @@
 
 public boolean isSynthetic() { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.Annotation[] getDeclaredAnnotations() { throw new RuntimeException("Stub!"); }
 
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java
index dade51c..4b5b841 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java
@@ -61,11 +61,11 @@
 
 public abstract java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] @libcore.util.NonNull [] getParameterAnnotations();
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull getjava.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAnnotations() { throw new RuntimeException("Stub!"); }
 
-public final boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) { throw new RuntimeException("Stub!"); }
+public final boolean isAnnotationPresent(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) { throw new RuntimeException("Stub!"); }
 }
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Field.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Field.annotated.java
index d212353..8a26ce3 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Field.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Field.annotated.java
@@ -33,7 +33,7 @@
 
 Field() { throw new RuntimeException("Stub!"); }
 
-public java.lang.Class<?> getDeclaringClass() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public java.lang.Class<?> getDeclaringClass() { throw new RuntimeException("Stub!"); }
 
 @libcore.util.NonNull public java.lang.String getName() { throw new RuntimeException("Stub!"); }
 
@@ -45,9 +45,9 @@
 
 @libcore.util.NonNull public java.lang.Class<?> getType() { throw new RuntimeException("Stub!"); }
 
-public java.lang.reflect.Type getGenericType() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public java.lang.reflect.Type getGenericType() { throw new RuntimeException("Stub!"); }
 
-public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
 
 public int hashCode() { throw new RuntimeException("Stub!"); }
 
@@ -55,48 +55,47 @@
 
 @libcore.util.NonNull public java.lang.String toGenericString() { throw new RuntimeException("Stub!"); }
 
-public native java.lang.Object get(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+@libcore.util.Nullable public native java.lang.Object get(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native boolean getBoolean(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native boolean getBoolean(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native byte getByte(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native byte getByte(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native char getChar(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native char getChar(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native short getShort(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native short getShort(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native int getInt(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native int getInt(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native long getLong(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native long getLong(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native float getFloat(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native float getFloat(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native double getDouble(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native double getDouble(@libcore.util.Nullable java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void set(java.lang.Object obj, java.lang.Object value) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void set(@libcore.util.Nullable java.lang.Object obj, @libcore.util.Nullable java.lang.Object value) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setBoolean(java.lang.Object obj, boolean z) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setBoolean(@libcore.util.Nullable java.lang.Object obj, boolean z) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setByte(java.lang.Object obj, byte b) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setByte(@libcore.util.Nullable java.lang.Object obj, byte b) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setChar(java.lang.Object obj, char c) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setChar(@libcore.util.Nullable java.lang.Object obj, char c) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setShort(java.lang.Object obj, short s) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setShort(@libcore.util.Nullable java.lang.Object obj, short s) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setInt(java.lang.Object obj, int i) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setInt(@libcore.util.Nullable java.lang.Object obj, int i) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setLong(java.lang.Object obj, long l) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setLong(@libcore.util.Nullable java.lang.Object obj, long l) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setFloat(java.lang.Object obj, float f) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setFloat(@libcore.util.Nullable java.lang.Object obj, float f) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public native void setDouble(java.lang.Object obj, double d) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
+public native void setDouble(@libcore.util.Nullable java.lang.Object obj, double d) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) { throw new RuntimeException("Stub!"); }
+public boolean isAnnotationPresent(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) { throw new RuntimeException("Stub!"); }
 
 public native java.lang.annotation.Annotation[] getDeclaredAnnotations();
 }
-
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Method.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Method.annotated.java
index 1c37b2e..004a5ed 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Method.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Method.annotated.java
@@ -35,7 +35,7 @@
 
 @libcore.util.NonNull public java.lang.Class<?> getDeclaringClass() { throw new RuntimeException("Stub!"); }
 
-public java.lang.String getName() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public java.lang.String getName() { throw new RuntimeException("Stub!"); }
 
 public int getModifiers() { throw new RuntimeException("Stub!"); }
 
@@ -55,7 +55,7 @@
 
 @libcore.util.NonNull public java.lang.reflect.Type[] getGenericExceptionTypes() { throw new RuntimeException("Stub!"); }
 
-public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
 
 public int hashCode() { throw new RuntimeException("Stub!"); }
 
@@ -63,7 +63,7 @@
 
 @libcore.util.NonNull public java.lang.String toGenericString() { throw new RuntimeException("Stub!"); }
 
-public native java.lang.Object invoke(java.lang.Object obj, java.lang.Object... args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException;
+@libcore.util.Nullable public native java.lang.Object invoke(@libcore.util.Nullable java.lang.Object obj, java.lang.@libcore.util.Nullable Object @libcore.util.Nullable ... args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException;
 
 public boolean isBridge() { throw new RuntimeException("Stub!"); }
 
@@ -73,12 +73,11 @@
 
 public boolean isDefault() { throw new RuntimeException("Stub!"); }
 
-public native java.lang.Object getDefaultValue();
+@libcore.util.Nullable public native java.lang.Object getDefaultValue();
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 @libcore.util.NonNull public java.lang.annotation.Annotation[] getDeclaredAnnotations() { throw new RuntimeException("Stub!"); }
 
 @libcore.util.NonNull public java.lang.annotation.Annotation[][] getParameterAnnotations() { throw new RuntimeException("Stub!"); }
 }
-
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Parameter.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Parameter.annotated.java
index 5d7ddb6..247db53 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Parameter.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Parameter.annotated.java
@@ -32,7 +32,7 @@
 
 Parameter(java.lang.String name, int modifiers, java.lang.reflect.Executable executable, int index) { throw new RuntimeException("Stub!"); }
 
-public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
 
 public int hashCode() { throw new RuntimeException("Stub!"); }
 
@@ -44,7 +44,7 @@
 
 public int getModifiers() { throw new RuntimeException("Stub!"); }
 
-public java.lang.String getName() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public java.lang.String getName() { throw new RuntimeException("Stub!"); }
 
 @libcore.util.NonNull public java.lang.reflect.Type getParameterizedType() { throw new RuntimeException("Stub!"); }
 
@@ -56,15 +56,15 @@
 
 public boolean isVarArgs() { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAnnotations() { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
-public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
+public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotations() { throw new RuntimeException("Stub!"); }
 }
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/ParameterizedType.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/ParameterizedType.annotated.java
index 6d72f3f..1502d68 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/ParameterizedType.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/ParameterizedType.annotated.java
@@ -34,5 +34,5 @@
 
 @libcore.util.NonNull public java.lang.reflect.Type getRawType();
 
-public java.lang.reflect.Type getOwnerType();
+@libcore.util.Nullable public java.lang.reflect.Type getOwnerType();
 }
diff --git a/ojluni/annotations/sdk/nullability/java/lang/reflect/Proxy.annotated.java b/ojluni/annotations/sdk/nullability/java/lang/reflect/Proxy.annotated.java
index 781308d..eb396c7 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Proxy.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Proxy.annotated.java
@@ -32,16 +32,15 @@
 @SuppressWarnings({"unchecked", "deprecation", "all"})
 public class Proxy implements java.io.Serializable {
 
-protected Proxy(java.lang.reflect.InvocationHandler h) { throw new RuntimeException("Stub!"); }
+protected Proxy(@libcore.util.NonNull java.lang.reflect.InvocationHandler h) { throw new RuntimeException("Stub!"); }
 
-@libcore.util.NonNull public static java.lang.Class<?> getProxyClass(java.lang.ClassLoader loader, java.lang.Class<?>... interfaces) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static java.lang.Class<?> getProxyClass(@libcore.util.Nullable java.lang.ClassLoader loader, java.lang.@libcore.util.NonNull Class<?> @libcore.util.NonNull ... interfaces) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-@libcore.util.NonNull public static java.lang.Object newProxyInstance(java.lang.ClassLoader loader, java.lang.Class<?>[] interfaces, java.lang.reflect.InvocationHandler h) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static java.lang.Object newProxyInstance(@libcore.util.Nullable java.lang.ClassLoader loader, java.lang.@libcore.util.NonNull Class<?> @libcore.util.NonNull [] interfaces, @libcore.util.NonNull java.lang.reflect.InvocationHandler h) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
-public static boolean isProxyClass(java.lang.Class<?> cl) { throw new RuntimeException("Stub!"); }
+public static boolean isProxyClass(@libcore.util.NonNull java.lang.Class<?> cl) { throw new RuntimeException("Stub!"); }
 
-@libcore.util.NonNull public static java.lang.reflect.InvocationHandler getInvocationHandler(java.lang.Object proxy) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static java.lang.reflect.InvocationHandler getInvocationHandler(@libcore.util.NonNull java.lang.Object proxy) throws java.lang.IllegalArgumentException { throw new RuntimeException("Stub!"); }
 
 protected java.lang.reflect.InvocationHandler h;
 }
-
diff --git a/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java b/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java
new file mode 100644
index 0000000..7f954af
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.nio;
+
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.ByteBuffer> {
+
+ByteBuffer(int mark, int pos, int lim, int cap) { super(0, 0, 0, 0, 0); throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.nio.ByteBuffer allocateDirect(int capacity) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.nio.ByteBuffer allocate(int capacity) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.nio.ByteBuffer wrap(byte @libcore.util.NonNull [] array, int offset, int length) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.nio.ByteBuffer wrap(byte @libcore.util.NonNull [] array) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer slice();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer duplicate();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer asReadOnlyBuffer();
+
+public abstract byte get();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer put(byte b);
+
+public abstract byte get(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer put(int index, byte b);
+
+@libcore.util.NonNull public java.nio.ByteBuffer get(byte @libcore.util.NonNull [] dst, int offset, int length) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.ByteBuffer get(byte @libcore.util.NonNull [] dst) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.ByteBuffer put(@libcore.util.NonNull java.nio.ByteBuffer src) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.ByteBuffer put(byte @libcore.util.NonNull [] src, int offset, int length) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.nio.ByteBuffer put(byte @libcore.util.NonNull [] src) { throw new RuntimeException("Stub!"); }
+
+public final boolean hasArray() { throw new RuntimeException("Stub!"); }
+
+public final byte @libcore.util.NonNull [] array() { throw new RuntimeException("Stub!"); }
+
+public final int arrayOffset() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer compact();
+
+public abstract boolean isDirect();
+
+@libcore.util.NonNull public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+public int hashCode() { throw new RuntimeException("Stub!"); }
+
+public boolean equals(@libcore.util.Nullable java.lang.Object ob) { throw new RuntimeException("Stub!"); }
+
+public int compareTo(@libcore.util.NonNull java.nio.ByteBuffer that) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.nio.ByteOrder order() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.nio.ByteBuffer order(@libcore.util.NonNull java.nio.ByteOrder bo) { throw new RuntimeException("Stub!"); }
+
+public abstract char getChar();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putChar(char value);
+
+public abstract char getChar(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putChar(int index, char value);
+
+@libcore.util.NonNull public abstract java.nio.CharBuffer asCharBuffer();
+
+public abstract short getShort();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putShort(short value);
+
+public abstract short getShort(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putShort(int index, short value);
+
+@libcore.util.NonNull public abstract java.nio.ShortBuffer asShortBuffer();
+
+public abstract int getInt();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putInt(int value);
+
+public abstract int getInt(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putInt(int index, int value);
+
+@libcore.util.NonNull public abstract java.nio.IntBuffer asIntBuffer();
+
+public abstract long getLong();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putLong(long value);
+
+public abstract long getLong(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putLong(int index, long value);
+
+@libcore.util.NonNull public abstract java.nio.LongBuffer asLongBuffer();
+
+public abstract float getFloat();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putFloat(float value);
+
+public abstract float getFloat(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putFloat(int index, float value);
+
+@libcore.util.NonNull public abstract java.nio.FloatBuffer asFloatBuffer();
+
+public abstract double getDouble();
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putDouble(double value);
+
+public abstract double getDouble(int index);
+
+@libcore.util.NonNull public abstract java.nio.ByteBuffer putDouble(int index, double value);
+
+@libcore.util.NonNull public abstract java.nio.DoubleBuffer asDoubleBuffer();
+}
diff --git a/ojluni/annotations/sdk/nullability/java/text/DateFormat.annotated.java b/ojluni/annotations/sdk/nullability/java/text/DateFormat.annotated.java
new file mode 100644
index 0000000..13e11a3
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/text/DateFormat.annotated.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1996 - All Rights Reserved
+ *
+ *   The original version of this source code and documentation is copyrighted
+ * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
+ * materials are provided under terms of a License Agreement between Taligent
+ * and Sun. This technology is protected by multiple US and International
+ * patents. This notice and attribution to Taligent may not be removed.
+ *   Taligent is a registered trademark of Taligent, Inc.
+ *
+ */
+
+
+package java.text;
+
+import java.util.Locale;
+import java.util.TimeZone;
+import java.util.Calendar;
+import java.util.Date;
+import java.io.InvalidObjectException;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public abstract class DateFormat extends java.text.Format {
+
+protected DateFormat() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.lang.StringBuffer format(@libcore.util.NonNull java.lang.Object obj, @libcore.util.NonNull java.lang.StringBuffer toAppendTo, @libcore.util.NonNull java.text.FieldPosition fieldPosition) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public abstract java.lang.StringBuffer format(@libcore.util.NonNull java.util.Date date, @libcore.util.NonNull java.lang.StringBuffer toAppendTo, @libcore.util.NonNull java.text.FieldPosition fieldPosition);
+
+@libcore.util.NonNull public final java.lang.String format(@libcore.util.NonNull java.util.Date date) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.util.Date parse(@libcore.util.NonNull java.lang.String source) throws java.text.ParseException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public abstract java.util.Date parse(@libcore.util.NonNull java.lang.String source, @libcore.util.NonNull java.text.ParsePosition pos);
+
+@libcore.util.Nullable public java.lang.Object parseObject(@libcore.util.NonNull java.lang.String source, @libcore.util.NonNull java.text.ParsePosition pos) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getTimeInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getTimeInstance(int style) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getTimeInstance(int style, @libcore.util.NonNull java.util.Locale aLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateInstance(int style) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateInstance(int style, @libcore.util.NonNull java.util.Locale aLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateTimeInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateTimeInstance(int dateStyle, int timeStyle) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getDateTimeInstance(int dateStyle, int timeStyle, @libcore.util.NonNull java.util.Locale aLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat getInstance() { throw new RuntimeException("Stub!"); }
+
+public static java.util.@libcore.util.NonNull Locale @libcore.util.NonNull [] getAvailableLocales() { throw new RuntimeException("Stub!"); }
+
+public void setCalendar(@libcore.util.NonNull java.util.Calendar newCalendar) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.util.Calendar getCalendar() { throw new RuntimeException("Stub!"); }
+
+public void setNumberFormat(@libcore.util.NonNull java.text.NumberFormat newNumberFormat) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.text.NumberFormat getNumberFormat() { throw new RuntimeException("Stub!"); }
+
+public void setTimeZone(@libcore.util.NonNull java.util.TimeZone zone) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.util.TimeZone getTimeZone() { throw new RuntimeException("Stub!"); }
+
+public void setLenient(boolean lenient) { throw new RuntimeException("Stub!"); }
+
+public boolean isLenient() { throw new RuntimeException("Stub!"); }
+
+public int hashCode() { throw new RuntimeException("Stub!"); }
+
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.Object clone() { throw new RuntimeException("Stub!"); }
+
+public static final int AM_PM_FIELD = 14; // 0xe
+
+public static final int DATE_FIELD = 3; // 0x3
+
+public static final int DAY_OF_WEEK_FIELD = 9; // 0x9
+
+public static final int DAY_OF_WEEK_IN_MONTH_FIELD = 11; // 0xb
+
+public static final int DAY_OF_YEAR_FIELD = 10; // 0xa
+
+public static final int DEFAULT = 2; // 0x2
+
+public static final int ERA_FIELD = 0; // 0x0
+
+public static final int FULL = 0; // 0x0
+
+public static final int HOUR0_FIELD = 16; // 0x10
+
+public static final int HOUR1_FIELD = 15; // 0xf
+
+public static final int HOUR_OF_DAY0_FIELD = 5; // 0x5
+
+public static final int HOUR_OF_DAY1_FIELD = 4; // 0x4
+
+public static final int LONG = 1; // 0x1
+
+public static final int MEDIUM = 2; // 0x2
+
+public static final int MILLISECOND_FIELD = 8; // 0x8
+
+public static final int MINUTE_FIELD = 6; // 0x6
+
+public static final int MONTH_FIELD = 2; // 0x2
+
+public static final int SECOND_FIELD = 7; // 0x7
+
+public static final int SHORT = 3; // 0x3
+
+public static final int TIMEZONE_FIELD = 17; // 0x11
+
+public static final int WEEK_OF_MONTH_FIELD = 13; // 0xd
+
+public static final int WEEK_OF_YEAR_FIELD = 12; // 0xc
+
+public static final int YEAR_FIELD = 1; // 0x1
+
+@libcore.util.NonNull protected java.util.Calendar calendar;
+
+@libcore.util.NonNull protected java.text.NumberFormat numberFormat;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public static class Field extends java.text.Format.Field {
+
+protected Field(@libcore.util.NonNull java.lang.String name, int calendarField) { super(null); throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.DateFormat.Field ofCalendarField(int calendarField) { throw new RuntimeException("Stub!"); }
+
+public int getCalendarField() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull protected java.lang.Object readResolve() throws java.io.InvalidObjectException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field AM_PM;
+static { AM_PM = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field DAY_OF_MONTH;
+static { DAY_OF_MONTH = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field DAY_OF_WEEK;
+static { DAY_OF_WEEK = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field DAY_OF_WEEK_IN_MONTH;
+static { DAY_OF_WEEK_IN_MONTH = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field DAY_OF_YEAR;
+static { DAY_OF_YEAR = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field ERA;
+static { ERA = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field HOUR0;
+static { HOUR0 = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field HOUR1;
+static { HOUR1 = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field HOUR_OF_DAY0;
+static { HOUR_OF_DAY0 = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field HOUR_OF_DAY1;
+static { HOUR_OF_DAY1 = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field MILLISECOND;
+static { MILLISECOND = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field MINUTE;
+static { MINUTE = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field MONTH;
+static { MONTH = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field SECOND;
+static { SECOND = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field TIME_ZONE;
+static { TIME_ZONE = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field WEEK_OF_MONTH;
+static { WEEK_OF_MONTH = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field WEEK_OF_YEAR;
+static { WEEK_OF_YEAR = null; }
+
+@libcore.util.NonNull public static final java.text.DateFormat.Field YEAR;
+static { YEAR = null; }
+}
+
+}
diff --git a/ojluni/annotations/sdk/nullability/java/text/NumberFormat.annotated.java b/ojluni/annotations/sdk/nullability/java/text/NumberFormat.annotated.java
new file mode 100644
index 0000000..7f51005
--- /dev/null
+++ b/ojluni/annotations/sdk/nullability/java/text/NumberFormat.annotated.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
+ *
+ *   The original version of this source code and documentation is copyrighted
+ * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
+ * materials are provided under terms of a License Agreement between Taligent
+ * and Sun. This technology is protected by multiple US and International
+ * patents. This notice and attribution to Taligent may not be removed.
+ *   Taligent is a registered trademark of Taligent, Inc.
+ *
+ */
+
+
+package java.text;
+
+import java.util.Locale;
+import java.util.Currency;
+import java.math.RoundingMode;
+import java.math.BigInteger;
+import java.io.InvalidObjectException;
+
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public abstract class NumberFormat extends java.text.Format {
+
+protected NumberFormat() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.StringBuffer format(@libcore.util.NonNull java.lang.Object number, @libcore.util.NonNull java.lang.StringBuffer toAppendTo, @libcore.util.NonNull java.text.FieldPosition pos) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public final java.lang.Object parseObject(@libcore.util.NonNull java.lang.String source, @libcore.util.NonNull java.text.ParsePosition pos) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.lang.String format(double number) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public final java.lang.String format(long number) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public abstract java.lang.StringBuffer format(double number, @libcore.util.NonNull java.lang.StringBuffer toAppendTo, @libcore.util.NonNull java.text.FieldPosition pos);
+
+@libcore.util.NonNull public abstract java.lang.StringBuffer format(long number, @libcore.util.NonNull java.lang.StringBuffer toAppendTo, @libcore.util.NonNull java.text.FieldPosition pos);
+
+@libcore.util.Nullable public abstract java.lang.Number parse(@libcore.util.NonNull java.lang.String source, @libcore.util.NonNull java.text.ParsePosition parsePosition);
+
+@libcore.util.Nullable public java.lang.Number parse(@libcore.util.NonNull java.lang.String source) throws java.text.ParseException { throw new RuntimeException("Stub!"); }
+
+public boolean isParseIntegerOnly() { throw new RuntimeException("Stub!"); }
+
+public void setParseIntegerOnly(boolean value) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat getInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.NumberFormat getInstance(@libcore.util.NonNull java.util.Locale inLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat getNumberInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.NumberFormat getNumberInstance(@libcore.util.NonNull java.util.Locale inLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat getIntegerInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.NumberFormat getIntegerInstance(@libcore.util.NonNull java.util.Locale inLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat getCurrencyInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.NumberFormat getCurrencyInstance(@libcore.util.NonNull java.util.Locale inLocale) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat getPercentInstance() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static java.text.NumberFormat getPercentInstance(@libcore.util.NonNull java.util.Locale inLocale) { throw new RuntimeException("Stub!"); }
+
+public static java.util.@libcore.util.NonNull Locale @libcore.util.NonNull [] getAvailableLocales() { throw new RuntimeException("Stub!"); }
+
+public int hashCode() { throw new RuntimeException("Stub!"); }
+
+public boolean equals(@libcore.util.Nullable java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.lang.Object clone() { throw new RuntimeException("Stub!"); }
+
+public boolean isGroupingUsed() { throw new RuntimeException("Stub!"); }
+
+public void setGroupingUsed(boolean newValue) { throw new RuntimeException("Stub!"); }
+
+public int getMaximumIntegerDigits() { throw new RuntimeException("Stub!"); }
+
+public void setMaximumIntegerDigits(int newValue) { throw new RuntimeException("Stub!"); }
+
+public int getMinimumIntegerDigits() { throw new RuntimeException("Stub!"); }
+
+public void setMinimumIntegerDigits(int newValue) { throw new RuntimeException("Stub!"); }
+
+public int getMaximumFractionDigits() { throw new RuntimeException("Stub!"); }
+
+public void setMaximumFractionDigits(int newValue) { throw new RuntimeException("Stub!"); }
+
+public int getMinimumFractionDigits() { throw new RuntimeException("Stub!"); }
+
+public void setMinimumFractionDigits(int newValue) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.Nullable public java.util.Currency getCurrency() { throw new RuntimeException("Stub!"); }
+
+public void setCurrency(@libcore.util.NonNull java.util.Currency currency) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.math.RoundingMode getRoundingMode() { throw new RuntimeException("Stub!"); }
+
+public void setRoundingMode(@libcore.util.Nullable java.math.RoundingMode roundingMode) { throw new RuntimeException("Stub!"); }
+
+public static final int FRACTION_FIELD = 1; // 0x1
+
+public static final int INTEGER_FIELD = 0; // 0x0
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public static class Field extends java.text.Format.Field {
+
+protected Field(@libcore.util.NonNull java.lang.String name) { super(null); throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull protected java.lang.Object readResolve() throws java.io.InvalidObjectException { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field CURRENCY;
+static { CURRENCY = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field DECIMAL_SEPARATOR;
+static { DECIMAL_SEPARATOR = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field EXPONENT;
+static { EXPONENT = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field EXPONENT_SIGN;
+static { EXPONENT_SIGN = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field EXPONENT_SYMBOL;
+static { EXPONENT_SYMBOL = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field FRACTION;
+static { FRACTION = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field GROUPING_SEPARATOR;
+static { GROUPING_SEPARATOR = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field INTEGER;
+static { INTEGER = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field PERCENT;
+static { PERCENT = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field PERMILLE;
+static { PERMILLE = null; }
+
+@libcore.util.NonNull public static final java.text.NumberFormat.Field SIGN;
+static { SIGN = null; }
+}
+
+}
diff --git a/ojluni/annotations/sdk/nullability/java/util/Map.annotated.java b/ojluni/annotations/sdk/nullability/java/util/Map.annotated.java
index 2c89e2b3..4008996 100644
--- a/ojluni/annotations/sdk/nullability/java/util/Map.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/util/Map.annotated.java
@@ -93,13 +93,13 @@
 
 public int hashCode();
 
-public static <K extends java.lang.Comparable<? super K>, V> @libcore.util.NonNull java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NonNull K, @libcore.util.Nullable V>> comparingByKey() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static <K extends java.lang.Comparable<? super K>, V> java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NonNull K, @libcore.util.Nullable V>> comparingByKey() { throw new RuntimeException("Stub!"); }
 
-public static <K, V extends java.lang.Comparable<? super V>> @libcore.util.NonNull java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.Nullable K, @libcore.util.NonNull V>> comparingByValue() { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static <K, V extends java.lang.Comparable<? super V>> java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.Nullable K, @libcore.util.NonNull V>> comparingByValue() { throw new RuntimeException("Stub!"); }
 
-public static <K, V> @libcore.util.NonNull java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.Nullable V>> comparingByKey(@libcore.util.NonNull java.util.Comparator<? super @libcore.util.NullFromTypeParam K> cmp) { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static <K, V> java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.Nullable V>> comparingByKey(@libcore.util.NonNull java.util.Comparator<? super @libcore.util.NullFromTypeParam K> cmp) { throw new RuntimeException("Stub!"); }
 
-public static <K, V> @libcore.util.NonNull java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.Nullable K, @libcore.util.NullFromTypeParam V>> comparingByValue(@libcore.util.NonNull java.util.Comparator<? super @libcore.util.NullFromTypeParam V> cmp) { throw new RuntimeException("Stub!"); }
+@libcore.util.NonNull public static <K, V> java.util.Comparator<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.Nullable K, @libcore.util.NullFromTypeParam V>> comparingByValue(@libcore.util.NonNull java.util.Comparator<? super @libcore.util.NullFromTypeParam V> cmp) { throw new RuntimeException("Stub!"); }
 }
 
 }
diff --git a/ojluni/src/main/java/java/io/FileDescriptor.java b/ojluni/src/main/java/java/io/FileDescriptor.java
index cd3a567..a2c833d 100644
--- a/ojluni/src/main/java/java/io/FileDescriptor.java
+++ b/ojluni/src/main/java/java/io/FileDescriptor.java
@@ -165,7 +165,6 @@
      * your needs with a libcore maintainer before using this method.
      * @hide internal use only
      */
-    @libcore.api.CorePlatformApi
     public final void setInt$(int fd) {
         this.descriptor = fd;
     }
diff --git a/ojluni/src/main/java/java/io/FileInputStream.java b/ojluni/src/main/java/java/io/FileInputStream.java
index 47712d4..03a67dc 100755
--- a/ojluni/src/main/java/java/io/FileInputStream.java
+++ b/ojluni/src/main/java/java/io/FileInputStream.java
@@ -203,7 +203,6 @@
     // Android-added: Internal/hidden constructor for specifying FileDescriptor ownership.
     // Android-removed: SecurityManager calls.
     /** @hide */
-    @libcore.api.CorePlatformApi
     public FileInputStream(FileDescriptor fdObj, boolean isFdOwner) {
         if (fdObj == null) {
             // Android-changed: Improved NullPointerException message.
diff --git a/ojluni/src/main/java/java/lang/Character.java b/ojluni/src/main/java/java/lang/Character.java
index 0b3081f..4fb4e21 100644
--- a/ojluni/src/main/java/java/lang/Character.java
+++ b/ojluni/src/main/java/java/lang/Character.java
@@ -578,6 +578,9 @@
      */
     public static final int MAX_CODE_POINT = 0X10FFFF;
 
+    // BEGIN Android-added: Use ICU.
+    // The indices in int[] DIRECTIONALITY are based on icu4c's u_charDirection(),
+    // accessed via getDirectionalityImpl(), implemented in Character.cpp.
     private static final byte[] DIRECTIONALITY = new byte[] {
             DIRECTIONALITY_LEFT_TO_RIGHT, DIRECTIONALITY_RIGHT_TO_LEFT,
             DIRECTIONALITY_EUROPEAN_NUMBER,
@@ -595,6 +598,7 @@
             DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE,
             DIRECTIONALITY_POP_DIRECTIONAL_FORMAT,
             DIRECTIONALITY_NONSPACING_MARK, DIRECTIONALITY_BOUNDARY_NEUTRAL };
+    // END Android-added: Use ICU.
 
     /**
      * Instances of this class represent particular subsets of the Unicode
@@ -672,15 +676,19 @@
          * This name must be the same as the block identifier.
          */
         private UnicodeBlock(String idName) {
-            this(idName, true);
+            super(idName);
+            map.put(idName, this);
         }
 
+        // BEGIN Android-added: ICU consistency: Don't map deprecated SURROGATES_AREA. b/26140229
+        // Add a (String, boolean) constructor for use by SURROGATES_AREA.
         private UnicodeBlock(String idName, boolean isMap) {
             super(idName);
             if (isMap) {
                 map.put(idName, this);
             }
         }
+        // END Android-added: ICU consistency: Don't map deprecated SURROGATES_AREA. b/26140229
 
         /**
          * Creates a UnicodeBlock with the given identifier name and
@@ -1260,6 +1268,8 @@
          */
         @Deprecated
         public static final UnicodeBlock SURROGATES_AREA =
+            // Android-changed: ICU consistency: Don't map deprecated SURROGATES_AREA. b/26140229
+            // new UnicodeBlock("SURROGATES_AREA");
             new UnicodeBlock("SURROGATES_AREA", false);
 
         /**
@@ -5473,12 +5483,20 @@
      * @see     Character#getType(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isLowerCase(int codePoint) {
+        return getType(codePoint) == Character.LOWERCASE_LETTER ||
+               CharacterData.of(codePoint).isOtherLowercase(codePoint);
+    }
+    */
     public static boolean isLowerCase(int codePoint) {
         return isLowerCaseImpl(codePoint);
     }
 
     @FastNative
     static native boolean isLowerCaseImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is an uppercase character.
@@ -5541,13 +5559,20 @@
      * @see     Character#getType(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isUpperCase(int codePoint) {
+        return getType(codePoint) == Character.UPPERCASE_LETTER ||
+               CharacterData.of(codePoint).isOtherUppercase(codePoint);
+    }
+    */
     public static boolean isUpperCase(int codePoint) {
         return isUpperCaseImpl(codePoint);
     }
 
     @FastNative
     static native boolean isUpperCaseImpl(int codePoint);
-
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is a titlecase character.
@@ -5622,12 +5647,19 @@
      * @see     Character#getType(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isTitleCase(int codePoint) {
+        return getType(codePoint) == Character.TITLECASE_LETTER;
+    }
+    */
     public static boolean isTitleCase(int codePoint) {
         return isTitleCaseImpl(codePoint);
     }
 
     @FastNative
     static native boolean isTitleCaseImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is a digit.
@@ -5698,12 +5730,19 @@
      * @see     Character#getType(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isDigit(int codePoint) {
+        return getType(codePoint) == Character.DECIMAL_DIGIT_NUMBER;
+    }
+    */
     public static boolean isDigit(int codePoint) {
         return isDigitImpl(codePoint);
     }
 
     @FastNative
     static native boolean isDigitImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if a character is defined in Unicode.
@@ -5754,12 +5793,19 @@
      * @see     Character#isUpperCase(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isDefined(int codePoint) {
+        return getType(codePoint) != Character.UNASSIGNED;
+    }
+    */
     public static boolean isDefined(int codePoint) {
         return isDefinedImpl(codePoint);
     }
 
     @FastNative
     static native boolean isDefinedImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is a letter.
@@ -5829,12 +5875,24 @@
      * @see     Character#isUpperCase(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isLetter(int codePoint) {
+        return ((((1 << Character.UPPERCASE_LETTER) |
+            (1 << Character.LOWERCASE_LETTER) |
+            (1 << Character.TITLECASE_LETTER) |
+            (1 << Character.MODIFIER_LETTER) |
+            (1 << Character.OTHER_LETTER)) >> getType(codePoint)) & 1)
+            != 0;
+    }
+    */
     public static boolean isLetter(int codePoint) {
         return isLetterImpl(codePoint);
     }
 
     @FastNative
     static native boolean isLetterImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is a letter or digit.
@@ -5881,12 +5939,25 @@
      * @see     Character#isUnicodeIdentifierPart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isLetterOrDigit(int codePoint) {
+        return ((((1 << Character.UPPERCASE_LETTER) |
+            (1 << Character.LOWERCASE_LETTER) |
+            (1 << Character.TITLECASE_LETTER) |
+            (1 << Character.MODIFIER_LETTER) |
+            (1 << Character.OTHER_LETTER) |
+            (1 << Character.DECIMAL_DIGIT_NUMBER)) >> getType(codePoint)) & 1)
+            != 0;
+    }
+    */
     public static boolean isLetterOrDigit(int codePoint) {
         return isLetterOrDigitImpl(codePoint);
     }
 
     @FastNative
     static native boolean isLetterOrDigitImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is permissible as the first
@@ -5976,13 +6047,25 @@
      *          character, <code>false</code> otherwise.
      * @since   1.7
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isAlphabetic(int codePoint) {
+        return (((((1 << Character.UPPERCASE_LETTER) |
+            (1 << Character.LOWERCASE_LETTER) |
+            (1 << Character.TITLECASE_LETTER) |
+            (1 << Character.MODIFIER_LETTER) |
+            (1 << Character.OTHER_LETTER) |
+            (1 << Character.LETTER_NUMBER)) >> getType(codePoint)) & 1) != 0) ||
+            CharacterData.of(codePoint).isOtherAlphabetic(codePoint);
+    }
+    */
     public static boolean isAlphabetic(int codePoint) {
         return isAlphabeticImpl(codePoint);
     }
 
     @FastNative
     static native boolean isAlphabeticImpl(int codePoint);
-
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character (Unicode code point) is a CJKV
@@ -5994,11 +6077,18 @@
      *          character, <code>false</code> otherwise.
      * @since   1.7
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isIdeographic(int codePoint) {
+        return CharacterData.of(codePoint).isIdeographic(codePoint);
+    }
+    */
     public static boolean isIdeographic(int codePoint) {
         return isIdeographicImpl(codePoint);
     }
     @FastNative
     static native boolean isIdeographicImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     // Android-changed: Removed @see tag (target does not exist on Android):
     // @see     javax.lang.model.SourceVersion#isIdentifier(CharSequence)
@@ -6058,6 +6148,12 @@
      * @see     Character#isUnicodeIdentifierStart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Use ICU.
+    /*
+    public static boolean isJavaIdentifierStart(int codePoint) {
+        return CharacterData.of(codePoint).isJavaIdentifierStart(codePoint);
+    }
+    */
     public static boolean isJavaIdentifierStart(int codePoint) {
         // Use precomputed bitmasks to optimize the ASCII range.
         if (codePoint < 64) {
@@ -6075,6 +6171,7 @@
                    | (1  << CONNECTOR_PUNCTUATION)
                    | (1  << LETTER_NUMBER))) != 0;
     }
+    // END Android-changed: Use ICU.
 
     // Android-changed: Removed @see tag (target does not exist on Android):
     // @see     javax.lang.model.SourceVersion#isIdentifier(CharSequence)
@@ -6144,6 +6241,12 @@
      * @see     Character#isUnicodeIdentifierPart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Use ICU.
+    /*
+    public static boolean isJavaIdentifierPart(int codePoint) {
+        return CharacterData.of(codePoint).isJavaIdentifierPart(codePoint);
+    }
+    */
     public static boolean isJavaIdentifierPart(int codePoint) {
         // Use precomputed bitmasks to optimize the ASCII range.
         if (codePoint < 64) {
@@ -6167,6 +6270,7 @@
                 || (codePoint >= 0 && codePoint <= 8) || (codePoint >= 0xe && codePoint <= 0x1b)
                 || (codePoint >= 0x7f && codePoint <= 0x9f);
     }
+    // END Android-changed: Use ICU.
 
     /**
      * Determines if the specified character is permissible as the
@@ -6217,12 +6321,19 @@
      * @see     Character#isUnicodeIdentifierPart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isUnicodeIdentifierStart(int codePoint) {
+        return CharacterData.of(codePoint).isUnicodeIdentifierStart(codePoint);
+    }
+    */
     public static boolean isUnicodeIdentifierStart(int codePoint) {
         return isUnicodeIdentifierStartImpl(codePoint);
     }
 
     @FastNative
     static native boolean isUnicodeIdentifierStartImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C..
 
     /**
      * Determines if the specified character may be part of a Unicode
@@ -6284,12 +6395,19 @@
      * @see     Character#isUnicodeIdentifierStart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isUnicodeIdentifierPart(int codePoint) {
+        return CharacterData.of(codePoint).isUnicodeIdentifierPart(codePoint);
+    }
+    */
     public static boolean isUnicodeIdentifierPart(int codePoint) {
         return isUnicodeIdentifierPartImpl(codePoint);
     }
 
     @FastNative
     static native boolean isUnicodeIdentifierPartImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C..
 
     /**
      * Determines if the specified character should be regarded as
@@ -6352,12 +6470,19 @@
      * @see     Character#isUnicodeIdentifierPart(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isIdentifierIgnorable(int codePoint) {
+        return CharacterData.of(codePoint).isIdentifierIgnorable(codePoint);
+    }
+    */
     public static boolean isIdentifierIgnorable(int codePoint) {
         return isIdentifierIgnorableImpl(codePoint);
     }
 
     @FastNative
     static native boolean isIdentifierIgnorableImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Converts the character argument to lowercase using case
@@ -6415,6 +6540,12 @@
      *
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int toLowerCase(int codePoint) {
+        return CharacterData.of(codePoint).toLowerCase(codePoint);
+    }
+    */
     public static int toLowerCase(int codePoint) {
         if (codePoint >= 'A' && codePoint <= 'Z') {
             return codePoint + ('a' - 'A');
@@ -6430,6 +6561,7 @@
 
     @FastNative
     static native int toLowerCaseImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Converts the character argument to uppercase using case mapping
@@ -6487,6 +6619,12 @@
      *
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int toUpperCase(int codePoint) {
+        return CharacterData.of(codePoint).toUpperCase(codePoint);
+    }
+    */
     public static int toUpperCase(int codePoint) {
         if (codePoint >= 'a' && codePoint <= 'z') {
             return codePoint - ('a' - 'A');
@@ -6502,6 +6640,7 @@
 
     @FastNative
     static native int toUpperCaseImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Converts the character argument to titlecase using case mapping
@@ -6558,12 +6697,19 @@
      * @see     Character#toUpperCase(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int toTitleCase(int codePoint) {
+        return CharacterData.of(codePoint).toTitleCase(codePoint);
+    }
+    */
     public static int toTitleCase(int codePoint) {
         return toTitleCaseImpl(codePoint);
     }
 
     @FastNative
     static native int toTitleCaseImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Returns the numeric value of the character {@code ch} in the
@@ -6667,6 +6813,12 @@
      * @see     Character#isDigit(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int digit(int codePoint, int radix) {
+        return CharacterData.of(codePoint).digit(codePoint, radix);
+    }
+    */
     public static int digit(int codePoint, int radix) {
         if (radix < MIN_RADIX || radix > MAX_RADIX) {
             return -1;
@@ -6688,6 +6840,7 @@
 
     @FastNative
     native static int digitImpl(int codePoint, int radix);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Returns the {@code int} value that the specified Unicode
@@ -6756,6 +6909,12 @@
      * @see     Character#isDigit(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int getNumericValue(int codePoint) {
+        return CharacterData.of(codePoint).getNumericValue(codePoint);
+    }
+    */
     public static int getNumericValue(int codePoint) {
         // This is both an optimization and papers over differences between Java and ICU.
         if (codePoint < 128) {
@@ -6783,6 +6942,7 @@
 
     @FastNative
     native static int getNumericValueImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is ISO-LATIN-1 white space.
@@ -6865,6 +7025,15 @@
      * @see     Character#isWhitespace(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isSpaceChar(int codePoint) {
+        return ((((1 << Character.SPACE_SEPARATOR) |
+                  (1 << Character.LINE_SEPARATOR) |
+                  (1 << Character.PARAGRAPH_SEPARATOR)) >> getType(codePoint)) & 1)
+            != 0;
+    }
+    */
     public static boolean isSpaceChar(int codePoint) {
         // We don't just call into icu4c because of the JNI overhead. Ideally we'd fix that.
         // SPACE or NO-BREAK SPACE?
@@ -6892,6 +7061,7 @@
 
     @FastNative
     static native boolean isSpaceCharImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is white space according to Java.
@@ -6956,6 +7126,12 @@
      * @see     Character#isSpaceChar(int)
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isWhitespace(int codePoint) {
+        return CharacterData.of(codePoint).isWhitespace(codePoint);
+    }
+    */
     public static boolean isWhitespace(int codePoint) {
         // We don't just call into icu4c because of the JNI overhead. Ideally we'd fix that.
         // Any ASCII whitespace character?
@@ -6987,6 +7163,7 @@
 
     @FastNative
     native static boolean isWhitespaceImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines if the specified character is an ISO control
@@ -7119,6 +7296,12 @@
      * @see     Character#UPPERCASE_LETTER UPPERCASE_LETTER
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static int getType(int codePoint) {
+        return CharacterData.of(codePoint).getType(codePoint);
+    }
+    */
     public static int getType(int codePoint) {
         int type = getTypeImpl(codePoint);
         // The type values returned by ICU are not RI-compatible. The RI skips the value 17.
@@ -7130,6 +7313,7 @@
 
     @FastNative
     static native int getTypeImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
 
     /**
      * Determines the character representation for a specific digit in
@@ -7242,6 +7426,12 @@
      * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
      * @since    1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static byte getDirectionality(int codePoint) {
+        return CharacterData.of(codePoint).getDirectionality(codePoint);
+    }
+    */
     public static byte getDirectionality(int codePoint) {
         if (getType(codePoint) == Character.UNASSIGNED) {
             return Character.DIRECTIONALITY_UNDEFINED;
@@ -7256,6 +7446,8 @@
 
     @FastNative
     native static byte getDirectionalityImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
+
     /**
      * Determines whether the character is mirrored according to the
      * Unicode specification.  Mirrored characters should have their
@@ -7294,12 +7486,20 @@
      *          if the character is not mirrored or is not defined.
      * @since   1.5
      */
+    // BEGIN Android-changed: Reimplement methods natively on top of ICU4C.
+    /*
+    public static boolean isMirrored(int codePoint) {
+        return CharacterData.of(codePoint).isMirrored(codePoint);
+    }
+    */
     public static boolean isMirrored(int codePoint) {
         return isMirroredImpl(codePoint);
     }
 
     @FastNative
     native static boolean isMirroredImpl(int codePoint);
+    // END Android-changed: Reimplement methods natively on top of ICU4C.
+
     /**
      * Compares two {@code Character} objects numerically.
      *
@@ -7337,6 +7537,46 @@
         return x - y;
     }
 
+    // BEGIN Android-removed: Use ICU.
+    /**
+     * Converts the character (Unicode code point) argument to uppercase using
+     * information from the UnicodeData file.
+     * <p>
+     *
+     * @param   codePoint   the character (Unicode code point) to be converted.
+     * @return  either the uppercase equivalent of the character, if
+     *          any, or an error flag ({@code Character.ERROR})
+     *          that indicates that a 1:M {@code char} mapping exists.
+     * @see     Character#isLowerCase(char)
+     * @see     Character#isUpperCase(char)
+     * @see     Character#toLowerCase(char)
+     * @see     Character#toTitleCase(char)
+     * @since 1.4
+     *
+    static int toUpperCaseEx(int codePoint) {
+        assert isValidCodePoint(codePoint);
+        return CharacterData.of(codePoint).toUpperCaseEx(codePoint);
+    }
+
+    /**
+     * Converts the character (Unicode code point) argument to uppercase using case
+     * mapping information from the SpecialCasing file in the Unicode
+     * specification. If a character has no explicit uppercase
+     * mapping, then the {@code char} itself is returned in the
+     * {@code char[]}.
+     *
+     * @param   codePoint   the character (Unicode code point) to be converted.
+     * @return a {@code char[]} with the uppercased character.
+     * @since 1.4
+     *
+    static char[] toUpperCaseCharArray(int codePoint) {
+        // As of Unicode 6.0, 1:M uppercasings only happen in the BMP.
+        assert isBmpCodePoint(codePoint);
+        return CharacterData.of(codePoint).toUpperCaseCharArray(codePoint);
+    }
+    */
+    // END Android-removed: Use ICU.
+
     /**
      * The number of bits used to represent a <tt>char</tt> value in unsigned
      * binary form, constant {@code 16}.
@@ -7398,6 +7638,8 @@
         if (!isValidCodePoint(codePoint)) {
             throw new IllegalArgumentException();
         }
+        // Android-changed: Use ICU.
+        // String name = CharacterName.get(codePoint);
         String name = getNameImpl(codePoint);
         if (name != null)
             return name;
@@ -7411,5 +7653,7 @@
         return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
     }
 
+    // Android-added: Use ICU.
+    // Implement getNameImpl() natively.
     private static native String getNameImpl(int codePoint);
 }
diff --git a/ojluni/src/main/java/java/lang/Class.java b/ojluni/src/main/java/java/lang/Class.java
index 512b965..f792248 100644
--- a/ojluni/src/main/java/java/lang/Class.java
+++ b/ojluni/src/main/java/java/lang/Class.java
@@ -908,7 +908,6 @@
      *
      * @hide
      */
-    @libcore.api.CorePlatformApi
     public String getPackageName$() {
         String name = getName();
         int last = name.lastIndexOf('.');
diff --git a/ojluni/src/main/java/java/lang/Math.java b/ojluni/src/main/java/java/lang/Math.java
index c229d6b..bb84b81 100644
--- a/ojluni/src/main/java/java/lang/Math.java
+++ b/ojluni/src/main/java/java/lang/Math.java
@@ -781,7 +781,6 @@
     /**
      * @hide for internal use only.
      */
-    @libcore.api.CorePlatformApi
     public static long randomLongInternal() {
         return RandomNumberGeneratorHolder.randomNumberGenerator.nextLong();
     }
diff --git a/ojluni/src/main/java/java/lang/Thread.java b/ojluni/src/main/java/java/lang/Thread.java
index 792f694..28b50a8 100644
--- a/ojluni/src/main/java/java/lang/Thread.java
+++ b/ojluni/src/main/java/java/lang/Thread.java
@@ -2105,13 +2105,11 @@
      * @hide used when configuring the runtime for exception logging; see
      *     {@link dalvik.system.RuntimeHooks} b/29624607
      */
-    @libcore.api.CorePlatformApi
     public static void setUncaughtExceptionPreHandler(UncaughtExceptionHandler eh) {
         uncaughtExceptionPreHandler = eh;
     }
 
     /** @hide */
-    @libcore.api.CorePlatformApi
     public static UncaughtExceptionHandler getUncaughtExceptionPreHandler() {
         return uncaughtExceptionPreHandler;
     }
diff --git a/ojluni/src/main/java/java/net/Inet4Address.java b/ojluni/src/main/java/java/net/Inet4Address.java
index cdb02e8..1fb7b92 100644
--- a/ojluni/src/main/java/java/net/Inet4Address.java
+++ b/ojluni/src/main/java/java/net/Inet4Address.java
@@ -95,7 +95,6 @@
 
     // BEGIN Android-added: Define special-purpose IPv4 address
     /** @hide */
-    @libcore.api.CorePlatformApi
     public static final InetAddress ANY = new Inet4Address(null, new byte[] { 0, 0, 0, 0 });
 
     /** @hide */
diff --git a/ojluni/src/main/java/java/net/InetAddress.java b/ojluni/src/main/java/java/net/InetAddress.java
index 52533af..2e6b534 100644
--- a/ojluni/src/main/java/java/net/InetAddress.java
+++ b/ojluni/src/main/java/java/net/InetAddress.java
@@ -1614,8 +1614,6 @@
      *
      * @hide used by frameworks/base to ensure that a getAllByName won't cause a DNS lookup.
      */
-    @libcore.api.CorePlatformApi
-    @libcore.api.IntraCoreApi
     public static boolean isNumeric(String address) {
         InetAddress inetAddress = parseNumericAddressNoThrow(address);
         return inetAddress != null && disallowDeprecatedFormats(address, inetAddress) != null;
@@ -1655,7 +1653,6 @@
      * @hide used by frameworks/base's NetworkUtils.numericToInetAddress
      * @throws IllegalArgumentException if {@code numericAddress} is not a numeric address
      */
-    @libcore.api.CorePlatformApi
     public static InetAddress parseNumericAddress(String numericAddress) {
         if (numericAddress == null || numericAddress.isEmpty()) {
             return Inet6Address.LOOPBACK;
diff --git a/ojluni/src/main/java/java/net/InetSocketAddress.java b/ojluni/src/main/java/java/net/InetSocketAddress.java
index 1c98e9c..74b559b 100644
--- a/ojluni/src/main/java/java/net/InetSocketAddress.java
+++ b/ojluni/src/main/java/java/net/InetSocketAddress.java
@@ -155,7 +155,6 @@
     /**
      * @hide internal use only
      */
-    @libcore.api.CorePlatformApi
     public InetSocketAddress() {
         // These will be filled in the native implementation of recvfrom.
         holder = new InetSocketAddressHolder(null, null, 0);
diff --git a/ojluni/src/main/java/java/net/Socket.java b/ojluni/src/main/java/java/net/Socket.java
index 92a3b9f..e36d15b 100644
--- a/ojluni/src/main/java/java/net/Socket.java
+++ b/ojluni/src/main/java/java/net/Socket.java
@@ -1777,7 +1777,6 @@
     /**
      * @hide internal use only
      */
-    @libcore.api.IntraCoreApi
     public FileDescriptor getFileDescriptor$() {
         return impl.getFileDescriptor();
     }
diff --git a/ojluni/src/main/java/java/net/SocketImpl.java b/ojluni/src/main/java/java/net/SocketImpl.java
index 72905ea..ade2630 100644
--- a/ojluni/src/main/java/java/net/SocketImpl.java
+++ b/ojluni/src/main/java/java/net/SocketImpl.java
@@ -231,7 +231,6 @@
     /**
      * @hide used by java.nio tests
      */
-    @libcore.api.CorePlatformApi
     public FileDescriptor getFD$() {
         return fd;
     }
diff --git a/ojluni/src/main/java/java/net/URLStreamHandler.java b/ojluni/src/main/java/java/net/URLStreamHandler.java
index 12b842c..dffc6d5 100644
--- a/ojluni/src/main/java/java/net/URLStreamHandler.java
+++ b/ojluni/src/main/java/java/net/URLStreamHandler.java
@@ -167,12 +167,25 @@
         if (!isUNCName && (start <= limit - 2) && (spec.charAt(start) == '/') &&
             (spec.charAt(start + 1) == '/')) {
             start += 2;
+            // BEGIN Android-changed: Check for all hostname termination chars. http://b/110955991
+            /*
             i = spec.indexOf('/', start);
             if (i < 0 || i > limit) {
                 i = spec.indexOf('?', start);
                 if (i < 0 || i > limit)
                     i = limit;
             }
+            */
+            LOOP: for (i = start; i < limit; i++) {
+                switch (spec.charAt(i)) {
+                    case '/':  // Start of path
+                    case '\\': // Start of path - see https://url.spec.whatwg.org/#host-state
+                    case '?':  // Start of query
+                    case '#':  // Start of fragment
+                        break LOOP;
+                }
+            }
+            // END Android-changed: Check for all hostname termination chars. http://b/110955991
 
             host = authority = spec.substring(start, i);
 
@@ -266,7 +279,9 @@
 
         // Parse the file path if any
         if (start < limit) {
-            if (spec.charAt(start) == '/') {
+            // Android-changed: Check for all hostname termination chars. http://b/110955991
+            // if (spec.charAt(start) == '/') {
+            if (spec.charAt(start) == '/' || spec.charAt(start) == '\\') {
                 path = spec.substring(start, limit);
             } else if (path != null && path.length() > 0) {
                 isRelPath = true;
diff --git a/ojluni/src/main/java/java/security/spec/ECParameterSpec.java b/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
index ce27045..65bd027 100644
--- a/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
@@ -121,7 +121,6 @@
      *
      * @hide
      */
-    @libcore.api.IntraCoreApi
     public void setCurveName(String curveName) {
         this.curveName = curveName;
     }
@@ -132,7 +131,6 @@
      *
      * @hide
      */
-    @libcore.api.IntraCoreApi
     public String getCurveName() {
         return curveName;
     }
diff --git a/ojluni/src/main/java/java/util/LinkedHashMap.java b/ojluni/src/main/java/java/util/LinkedHashMap.java
index fac50c2..7c8cad0 100644
--- a/ojluni/src/main/java/java/util/LinkedHashMap.java
+++ b/ojluni/src/main/java/java/util/LinkedHashMap.java
@@ -493,7 +493,6 @@
      * Returns the eldest entry in the map, or {@code null} if the map is empty.
      * @hide
      */
-    @libcore.api.CorePlatformApi
     public Map.Entry<K, V> eldest() {
         return head;
     }