Merge "Snap for 5798008 from 4d22f2e7a06d869d63d614ed87eb3efca87d5302 to sdk-release" into sdk-release
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index f446439..e1d8145 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -45,9 +45,34 @@
 ]
 
 // The Java files and their associated resources.
-core_resource_dirs = [
-    "luni/src/main/java",
-    "ojluni/src/main/resources/",
+filegroup {
+    name: "core-luni-resources",
+    visibility: [
+        "//libcore:__subpackages__",
+    ],
+    path: "luni/src/main/java/",
+    srcs: [
+        "luni/src/main/java/libcore/net/android.mime.types",
+        "luni/src/main/java/java/util/logging/logging.properties",
+        "luni/src/main/java/java/security/security.properties",
+    ],
+}
+
+filegroup {
+    name: "core-ojluni-resources",
+    visibility: [
+        "//libcore:__subpackages__",
+    ],
+    path: "ojluni/src/main/resources/",
+    srcs: [
+        "ojluni/src/main/resources/**/*",
+    ],
+}
+
+core_resources = [
+    ":core-luni-resources",
+    ":core-ojluni-resources",
+    ":debian.mime.types",
 ]
 
 // The source files that go into core-oj.
@@ -74,7 +99,6 @@
     ],
     srcs: [
         ":non_openjdk_java_files",
-        ":android_icu4j_src_files",
     ],
 }
 
@@ -84,7 +108,6 @@
     name: "core_libart_api_files",
     srcs: [
         ":non_openjdk_javadoc_files",
-        ":android_icu4j_src_files",
     ],
 }
 
@@ -97,6 +120,7 @@
         "//frameworks/base",
     ],
     srcs: [
+        ":android_icu4j_src_files",
         ":core_oj_api_files",
         ":core_libart_api_files",
         ":conscrypt_public_api_files",
@@ -117,6 +141,7 @@
         "//libcore:__subpackages__",
     ],
     srcs: [
+        ":android_icu4j_src_files",
         ":apache-xml_api_files",
         ":bouncycastle_java_files",
         ":conscrypt_java_files",
@@ -167,6 +192,7 @@
     defaults: ["libcore_java_defaults"],
 
     srcs: [
+        ":android_icu4j_src_files",
         ":core_oj_java_files",
         ":core_libart_java_files",
         ":openjdk_lambda_stub_files",
@@ -180,11 +206,19 @@
         javacflags: ["--patch-module=java.base=."],
     },
 
-    java_resource_dirs: core_resource_dirs,
+    java_resources: core_resources,
     static_libs: ["android_icu4j_resources_lib"],
     java_version: "1.9",
 
     installable: false,
+
+    plugins: ["compat-changeid-annotation-processor"],
+}
+
+platform_compat_config {
+    name: "libcore-platform-compat-config",
+    prefix: "libcore",
+    src: ":core-all",
 }
 
 // A system modules definition for use by core library targets only. It only
@@ -192,7 +226,7 @@
 // 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,
+// other parts of the core library like core-oj, core-libart, core-icu4j, conscrypt,
 // bouncycastle, etc.
 //
 // If you want to compile against the entire core library implementation, for
@@ -216,7 +250,7 @@
     hostdex: true,
 
     srcs: [":core_oj_java_files"],
-    java_resource_dirs: core_resource_dirs,
+    java_resources: core_resources,
 
     sdk_version: "none",
     libs: ["core-all"],
@@ -247,8 +281,8 @@
 }
 
 // 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.
+// just java.*, javax.* code but also android.system.* and various internal
+// libcore.* packages.
 java_library {
     name: "core-libart",
     visibility: [
@@ -263,7 +297,6 @@
     hostdex: true,
 
     srcs: [":core_libart_java_files"],
-    static_libs: ["android_icu4j_resources_lib"],
     java_version: "1.9",
 
     sdk_version: "none",
@@ -296,6 +329,28 @@
     },
 }
 
+java_library {
+    name: "core-icu4j",
+    visibility: [
+        "//art/build/apex",
+        "//external/robolectric-shadows",
+        "//frameworks/layoutlib",
+    ],
+    defaults: ["libcore_java_defaults"],
+    installable: true,
+    hostdex: true,
+
+    srcs: [":android_icu4j_src_files"],
+    static_libs: ["android_icu4j_resources_lib"],
+
+    sdk_version: "none",
+    libs: ["core-all"],
+    system_modules: "core-all-system-modules",
+    openjdk9: {
+        javacflags: ["--patch-module=java.base=."],
+    },
+}
+
 // Provided solely to contribute information about which hidden parts of the
 // core-oj API are used by apps.
 //
@@ -334,7 +389,7 @@
 }
 
 //
-// Guaranteed unstripped versions of core-oj and core-libart.
+// Guaranteed unstripped versions of core-icu4j, 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.
@@ -369,6 +424,19 @@
     notice: "ojluni/NOTICE",
 }
 
+java_library {
+    name: "core-icu4j-testdex",
+    installable: true,
+    static_libs: ["core-icu4j"],
+    sdk_version: "none",
+    libs: ["core-all"],
+    system_modules: "core-all-system-modules",
+    dxflags: ["--core-library"],
+    dex_preopt: {
+        enabled: false,
+    },
+}
+
 java_defaults {
     name: "core_lambda_stubs_defaults",
     defaults: ["libcore_java_defaults"],
@@ -457,6 +525,7 @@
     libs: [
         "core-oj",
         "core-libart",
+        "core-icu4j",
         "bouncycastle",
         "conscrypt",
         "okhttp",
diff --git a/apex/Android.bp b/apex/Android.bp
new file mode 100644
index 0000000..51a7335
--- /dev/null
+++ b/apex/Android.bp
@@ -0,0 +1,45 @@
+//
+// Copyright (C) 2019 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.
+
+// i18n APEX is intended as a home for ICU as of July 2019.
+// Various parts and dependencies of ICU would be gradually moved into this APEX,
+// and the below build rules should reflect the latest status.
+// TODO(b/138434658): Move the apex declaration back to external/icu
+// The apex is declared in libcore/ to workaround new dependency from external/icu
+// to system/sepolicy in a downstream branch.
+apex {
+    name: "com.android.i18n",
+    defaults: ["com.android.i18n-defaults"],
+    certificate: ":com.android.i18n.certificate",
+}
+
+apex_defaults {
+    name: "com.android.i18n-defaults",
+    compile_multilib: "both",
+    manifest: "manifest.json",
+    prebuilts: ["apex_icu.dat"],
+    key: "com.android.i18n.key",
+}
+
+apex_key {
+    name: "com.android.i18n.key",
+    public_key: "com.android.i18n.avbpubkey",
+    private_key: "com.android.i18n.pem",
+}
+
+android_app_certificate {
+    name: "com.android.i18n.certificate",
+    certificate: "com.android.i18n",
+}
diff --git a/apex/com.android.i18n.avbpubkey b/apex/com.android.i18n.avbpubkey
new file mode 100644
index 0000000..f1c97a0
--- /dev/null
+++ b/apex/com.android.i18n.avbpubkey
Binary files differ
diff --git a/apex/com.android.i18n.pem b/apex/com.android.i18n.pem
new file mode 100644
index 0000000..7676453
--- /dev/null
+++ b/apex/com.android.i18n.pem
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKwIBAAKCAgEA89VXuQrlqB0L731Es2ud65k5XkyGn0FjQfynPYRPz3nkpNaF
+3LbJ6JXIGKUQMY2pVQFNl2wUtylTJohNv8SWu/hPBMOmHu2zGvvfErKN7QD25y12
+D9jws3VlPhCWQsEZSjloYKI1MvMPcvtLgHoSuMl6JlT8mngC+uR8WLGtDKZYGICf
+I2rhQ5ugzDp00tGJJV9HKAXHx7zA9X+29HbMte57ibOrO4Xs7zLankV3rVEc0ZcD
+phA1RYh6lg9KYfsq/zbEbCRGPLTlqKa3zDPrnXTKInR//5fW7tWgqqRyXGumM8pA
+B1Huba878WnMwcWWYLjxRMQ6hOOCnGY7167JoAnX+NRmUZWXrrSiaCr6o61ingb6
+6BvQTN0f1q2lXIf1bOPRkeNkxBB7q3YFa4XaF9ZpQs7V4vlrvE/uLWDmhTQ6snML
+zWYbD+/nQ6u5BIdh+1rNk5RWp53IoNTGyJQnTpSkA2u+rtDuyKG4av6Vx2cPJ5Mu
+8vAALAyEOqlZr0CeJR0h3m6XVt0PpDxNUvQU53tlzIKD2BuELWeRSJ79DkYf+Soh
+vc0upDbdsy1r4C/Df5UpKnOKCmrYmJ1tdiigVeDH3y0B0ilD2dUqubqlc5Tw0a13
+PkpWPdJV7QpTyb3GDWa4DRpYRxCGDylCsS2rsXbsiMGqJFL3G0w06ahTmFUCAwEA
+AQKCAgEA4nVbQsXHI8rOYgADBWxGwCCPsm/6fABbslZ38N9ozHYWD64ZpzKw9W3e
+6FytXIiIIyXRrXe5CZ+81UW0iA2KPUvR/8fCCmmTddVFifUBcYP6zBxh0TgX3WSD
+wg/frmHvHguRUGZ2aDpsN8sChXFa3/pnkyBNdx1NDz2T60AhS2VW3nLe2iMS0hrB
+Tcxg4cevy2DhEl/D+1LoF1olTojjeXjjjbGrr92jf0jI2EQGcZaq4FGUFvBouYqW
+57WNzNBcT6nK5fEOtqT/wxIMFACIrLViYnu2wWiBO1J3JOUUPZfRRbpqmyHSAlbE
+omMzwyfCkVRS6B4jh3ZRwPYGUDvKjyNLeXXEr7Q6sAiwhvgz8Z5DIyzZr9SkExuQ
+5jfjfYCNsFaA/QmA34hV5KsPLfLFbW3hvDc6ApOn3yvOkIP3Cb2JM/mfyHh7cRpz
+y/UTep2e3uNj7fDkdrqp2oj/EOSKa0KSJCpqkgUwEFFCEvxeYeUgwlM+axSZNXEx
+ocRgQpui/2tVH8rgny3ayYDknleVaWtzxg7QLH7vV90ztjh4XjmZgl4R6N6vO1IT
+G2XN05vySoE+8ZdQVz3Ko3w3NLon4gwyXv8K+PmHBUsIoY37OPpZoj24n/Uajcuh
+crr5zSGlXhC+OzNk1tJ1NosHF70b/sYwdSIRpxEzA7QggSi6iAUCggEBAP5yHpkr
+BZB/C95zT4xd8ugYAw/5rFQXgwYkf1CYUp/lEXBUJGnimIwo5Gr9tGAAxTwXTTJH
+TI25EhAFu/WEh4h31SkL2b3S6jqupCqYwZdrl5TAY/35FBpGZN+ZirTHPP6ZobxX
+8zhHTl+7mKN/neA6sbLwH4WDZa+LUHScTnVSjzyL2PorPdsolFjOLILQE6LZjinB
+5bX972wjK4Q72gfdkia/Csq8Wo2/k53A2ur0fFojRHHI1M9Fthe6OI4RX/RwyHih
+R9S68xrz2bcYQ8XpoaaNpLY/FXev8WcBicjApN+eQQCK2ZGA9+UxgQRld317Wvqf
+zAyKp5idtRJUbb8CggEBAPVSoNyrghZFfaWGDe3pCnKkeZhqNsLbI5YrQohX6Quy
+BhRCP5t5wyNuMQX5rRZqeb3VgbW/06faVwZZ+bwA0KT7RYy0zgJhfD6bZ7WmzQMc
+HmAVqvN8iZIIjpMeN/174yYdqq0ShUYmra151ReL/CWs32kBWNKT6l487J7DAoYR
+ZHtec9nbs2ZFqea+PNAP8VAcsmsemwXe1w63RxDgdZccJmMj0TWmBj47RstMWTLE
+CrCGfXW9qmvs/Itzbuy589DS0AXZfTW+U0TD4RnCcjV7JDyEZASA3V7lMiyKXDTJ
+6+CUcgzOWzdTfAeVcG0olXXNCdCePX8uiqkwSCaXpusCggEBAI4tHkPf8kAHfY5T
+SIPaizx9DlkC3fQvHxtzkWBrfN+zk8b8fUxdPXgz8U6HbR6nz44ARzZs+K3IV/tz
++M77uu/aZdWFtamIDTG1HC5hJOuDRzPrPPRRFZaI9xyqIwNYwRBSsDkZu+IalgSQ
+Qn45dPIyWdDus+5auZsZcV93Z6/O7hKa4icHuoyXZC0rJ1wBALficLmMitrihcIa
+9Nnyx6XVfTEBVvppvP+vqMBhXvIiosmLI1ehLKiU/2bKu4dG1iM0UhB1rjmELQtG
+bsUMXfJc1eLHCt566XfzbCRui5sNahM5zoCLFX9kXSBIRRs7x0TqhK++Uro/T97L
+YL5ZRukCggEBAOaEpB93EZ/34F7/HmumBWlAX/n2JErpPAFJ2RTg9l1FBS1YKwjf
+W5wZWPtyZ1Ce8JKO43lzLWGWaxvOxDoC0guVCP90jffyvprd0JACkrYPYAONmLt/
+FI4ieEaJqLcKCKGyUsSamJ0Yjy5pQvEDWwXT8YJr/5iv4RR4TyfHusFb6n16fYYD
+SgoZ/9KQg/hGYsySipzZf3X+tTpgweh74kMB8phJ+bZdsZQcgyNZNJ/dUuYZGh7f
+ABq174DiESNkgFSDI3G7skoj8360SPq5mjPi6GPtS0ZoCJu45nKv+ICqFHlNQ/YA
+mfnc+rjtlV0dO4QcDNL5PnQZubXNZp7M9c0CggEBAIrfxdeELSqeVld3nhHFty0b
+ZdmFJWRj6k9zjoOYe8LPkAiue0Zm10sCiLFiRgTH6msnfBloYJ2iiDgSSnIlUvaH
+HFxoLWtv2az2B3g6gfJ5KbdE8mqfz0hGMOUBPFBarC4HrPslR28Cwn8mD5CvN4a/
+oAz3kOlaGokVF6Ikwd606JBFTVKSwr2niTJUwGXgn85tViCWqUm4v24BntbZZ9Rs
+k6ffBUl/k02zw/U405I3qTjCAnetNY3wHmjvdqkCcoWTAmG04IfGlqVE3NMjjLQD
+h9Xx2Nr5SV6djWbmYfT0Ox4Ha/IPuCCAZbBv6Or2wQSOQwb5fUgFcu3NrXU1rQQ=
+-----END RSA PRIVATE KEY-----
diff --git a/apex/com.android.i18n.pk8 b/apex/com.android.i18n.pk8
new file mode 100644
index 0000000..100ed14
--- /dev/null
+++ b/apex/com.android.i18n.pk8
Binary files differ
diff --git a/apex/com.android.i18n.x509.pem b/apex/com.android.i18n.x509.pem
new file mode 100644
index 0000000..fcf1a53
--- /dev/null
+++ b/apex/com.android.i18n.x509.pem
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFUTCCAzmgAwIBAgIUHufr9X4LD87MyuJ/8AaMvsIhXjUwDQYJKoZIhvcNAQEL
+BQAwNzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmcm9uaWExEzARBgNVBAoM
+Ckdvb2dsZSBMTEMwIBcNMTkwNzA1MTU0ODM2WhgPNDc1NzA1MzExNTQ4MzZaMDcx
+CzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZnJvbmlhMRMwEQYDVQQKDApHb29n
+bGUgTExDMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsUMFBc1QNyhj
+gU47F2O3kUrZhATA6Gz644sXvrqUg03retG3jsIEFmBXgbXngvF2yq9sRiGm4D5j
+9Sf5fguDqy9C/Q8MiUEAqQo1ygy9MubMfdGVLb2dcFoKXwyig8KzSS03+73IiUnF
+iCy5GzPO6ltga4nsbXUE6egexE3WGLQ0Lu7gCLNZn1Zd20p4BlTUl64CEu9zt6NN
+D6okd7IGceipBbpK9WDMW6ygXJ5sTJohZYSrSOPkoQFVilWFd5VryBxboTmxhSyo
+4dvNavnNCKOhsCCi8QIHOlXMDWxN970giv60FzoXoD2QwD5o+3I6SIIutEnGmh/d
+SECcK9yK+YECqw2XhvoBR4NH4RltaWKZsy62YPSYZXJXZ4H1P+9L9Q5dwLlI2Itt
+IWtYY88T8P2w8e2KzYewkE/XM4kRUw8pNWod1Hok2WuvZxdbPJ0+Hhvo1FVTwV1K
+kdtUuVPut6fpA2hEfGmwdKpK18Qe5ZLBZ1r1lSrjlfct+BWelADaZRNNyJey0u/s
+DgZGbiJG6tJqDESN229/eMTRt9gDncIx7S37RFgOv8jlUul5miKH3QP6neotofWw
+EWEKFjaDNhqU83rdpk48Br/HTiXA6pvaGlN0RQyBVB7uavvTYKTp8cGU11hkIx8p
+Vkp0EOCs9ajlt1+GyMCrPOk8A10rrOcCAwEAAaNTMFEwHQYDVR0OBBYEFMXzY0Gf
+eAdY8RjzwPnOou8VgjD3MB8GA1UdIwQYMBaAFMXzY0GfeAdY8RjzwPnOou8VgjD3
+MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBABrAExrvMkg26gQg
+rUh170Ms8T5jvIpWyIb7fSLjsA0c2q+zZiIUViO1t2eNQtdExGcmEOBF1+LqAIbT
+zA8nz9ZHweGZi01VodPaGKuz2VWWMzQaENW2RQGaxO9g8nCHGrbwchE7IbNOT1FD
+jzVYWcCKydr4niJWjSy9ey8eNDv/Iqto64/nPI7PxtBVfH7G8hgamyVtwWhhciTH
+nlg6X0EAxq5VwZSK4G8n+gsozPQHRjvBrSzt0A187vh/g6LQPLDZjPnzbZVtfFtM
+pv+hImxyDN3DZYrna2aGxWBIXEFjH61xueBGWaCo8TwvR8NIHM/i4s/zyhUxGUYL
+307i940cEF3rYJ/urzZzXJlxiu8p0Y12i/t+vXRqXM8d65QSMLqDDBHqZ3mPkcBp
+U7hWVi5HuyWGQF4FMK8sdemJITJpg1xztybsvRJ9kDeWxPNQllC4dREaKVhI/3WM
+eP7bpMmZxngoHbAB2f11lQf1A0fWFkng/Gntqnw0Dd6J+++NuuoFUjZLAWzUpoje
+J6J9CuxBjng0n94ZN+E8E5zsAtaO9WvhSQwTvNbHZmERxvtSm6mIH1XEBTi5tOHZ
+PBAAJuzZrFFZWevI44vgpCrF4lO3F9qE+sKn+2sARGuAjGCNV+jJCD+7tySjf7js
+2uaWgWOl7EexciIHD9FbZ3ANsiRU
+-----END CERTIFICATE-----
diff --git a/apex/manifest.json b/apex/manifest.json
new file mode 100644
index 0000000..4d1b2b6
--- /dev/null
+++ b/apex/manifest.json
@@ -0,0 +1,4 @@
+{
+  "name": "com.android.i18n",
+  "version": 1
+}
\ No newline at end of file
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 3729468..6f89b99 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -53,6 +53,7 @@
         ABI_TO_INSTRUCTION_SET_MAP.put("x86", "x86");
         ABI_TO_INSTRUCTION_SET_MAP.put("x86_64", "x86_64");
         ABI_TO_INSTRUCTION_SET_MAP.put("arm64-v8a", "arm64");
+        ABI_TO_INSTRUCTION_SET_MAP.put("arm64-v8a-hwasan", "arm64");
     }
 
     /**
@@ -651,6 +652,12 @@
     public static native boolean hasBootImageSpaces();
 
     /**
+     * Used to notify the runtime that boot completed.
+     */
+    @libcore.api.CorePlatformApi
+    public static native void bootCompleted();
+
+    /**
      * Returns the instruction set of the current runtime.
      */
     @UnsupportedAppUsage
diff --git a/luni/TEST_MAPPING b/luni/TEST_MAPPING
new file mode 100644
index 0000000..f71de6b
--- /dev/null
+++ b/luni/TEST_MAPPING
@@ -0,0 +1,13 @@
+{
+  "presubmit": [
+    // TODO(b/130283485): Remove this once the example has served its purpose.
+    {
+      "name": "CtsLibcoreTestCases",
+      "options": [
+        {
+          "include-annotation": "libcore.testing.categories.Example"
+        }
+      ]
+    }
+  ]
+}
diff --git a/luni/src/main/java/android/system/UnixSocketAddress.java b/luni/src/main/java/android/system/UnixSocketAddress.java
index bd211ef..993cc5b 100644
--- a/luni/src/main/java/android/system/UnixSocketAddress.java
+++ b/luni/src/main/java/android/system/UnixSocketAddress.java
@@ -35,6 +35,7 @@
     // 1) pathname: 0 < sun_path.length <= NAMED_PATH_LENGTH, sun_path[0] != 0.
     // 2) unnamed: sun_path = [].
     // 3) abstract: 0 < sun_path.length <= NAMED_PATH_LENGTH, sun_path[0] == 0.
+    // Note that the array referenced by this field can be modified from JNI (libcore_io_Linux.cpp).
     private final byte[] sun_path;
 
     /** This constructor is also used from JNI. */
@@ -56,6 +57,9 @@
 
     /**
      * Creates a named, abstract AF_UNIX socket address.
+     *
+     * @throws NullPointerException if {@code name} is null
+     * @throws IllegalArgumentException if {@code name} is invalid, e.g. too long
      */
     public static UnixSocketAddress createAbstract(String name) {
         byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8);
@@ -67,6 +71,9 @@
 
     /**
      * Creates a named, filesystem AF_UNIX socket address.
+     *
+     * @throws NullPointerException if {@code name} is null
+     * @throws IllegalArgumentException if {@code name} is invalid, e.g. too long
      */
     @libcore.api.CorePlatformApi
     public static UnixSocketAddress createFileSystem(String pathName) {
diff --git a/luni/src/main/java/libcore/net/MimeMap.java b/luni/src/main/java/libcore/net/MimeMap.java
index 756fe3f..afb6cbd 100644
--- a/luni/src/main/java/libcore/net/MimeMap.java
+++ b/luni/src/main/java/libcore/net/MimeMap.java
@@ -29,7 +29,7 @@
 @libcore.api.CorePlatformApi
 public abstract class MimeMap {
     private static AtomicReference<MimeMap> defaultHolder = new AtomicReference<>(
-            MimeMapImpl.parseFromResources("mime.types", "android.mime.types"));
+            MimeMapImpl.parseFromResources("/mime.types", "android.mime.types"));
 
     /**
      * @return The system's current default {@link MimeMap}.
diff --git a/luni/src/main/java/libcore/net/mime.types b/luni/src/main/java/libcore/net/mime.types
deleted file mode 100644
index dfa7a42..0000000
--- a/luni/src/main/java/libcore/net/mime.types
+++ /dev/null
@@ -1,844 +0,0 @@
-###############################################################################
-#
-#  MIME media types and the extensions that represent them.
-#
-#  The format of this file is a media type on the left and zero or more
-#  filename extensions on the right.  Programs using this file will map
-#  files ending with those extensions to the associated type.
-#
-#  This file is part of the "mime-support" package.  Please report a bug using
-#  the "reportbug" command of the "reportbug" package if you would like new
-#  types or extensions to be added.
-#
-#  The reason that all types are managed by the mime-support package instead
-#  allowing individual packages to install types in much the same way as they
-#  add entries in to the mailcap file is so these types can be referenced by
-#  other programs (such as a web server) even if the specific support package
-#  for that type is not installed.
-#
-#  Users can add their own types if they wish by creating a ".mime.types"
-#  file in their home directory.  Definitions included there will take
-#  precedence over those listed here.
-#
-###############################################################################
-
-
-application/activemessage
-application/andrew-inset			ez
-application/annodex				anx
-application/applefile
-application/atom+xml				atom
-application/atomcat+xml				atomcat
-application/atomicmail
-application/atomserv+xml			atomsrv
-application/batch-SMTP
-application/bbolin				lin
-application/beep+xml
-application/cals-1840
-application/commonground
-application/cu-seeme				cu
-application/cybercash
-application/davmount+xml			davmount
-application/dca-rft
-application/dec-dx
-application/dicom				dcm
-application/docbook+xml
-application/dsptype				tsp
-application/dvcs
-application/ecmascript				es
-application/edi-consent
-application/edi-x12
-application/edifact
-application/epub+zip				epub
-application/eshop
-application/font-sfnt				otf ttf
-application/font-tdpfr				pfr
-application/font-woff				woff
-application/futuresplash			spl
-application/ghostview
-application/gzip				gz
-application/hta					hta
-application/http
-application/hyperstudio
-application/iges
-application/index
-application/index.cmd
-application/index.obj
-application/index.response
-application/index.vnd
-application/iotp
-application/ipp
-application/isup
-application/java-archive			jar
-application/java-serialized-object		ser
-application/java-vm				class
-application/javascript				js
-application/json				json
-application/m3g					m3g
-application/mac-binhex40			hqx
-application/mac-compactpro			cpt
-application/macwriteii
-application/marc
-application/mathematica				nb nbp
-application/mbox				mbox
-application/ms-tnef
-application/msaccess				mdb
-application/msword				doc dot
-application/mxf					mxf
-application/news-message-id
-application/news-transmission
-application/ocsp-request
-application/ocsp-response
-application/octet-stream			bin deploy msu msp
-application/oda					oda
-application/oebps-package+xml			opf
-application/ogg					ogx
-application/onenote				one onetoc2 onetmp onepkg
-application/parityfec
-application/pdf					pdf
-application/pgp-encrypted			pgp
-application/pgp-keys				key
-application/pgp-signature			sig
-application/pics-rules				prf
-application/pkcs10
-application/pkcs7-mime
-application/pkcs7-signature
-application/pkix-cert
-application/pkix-crl
-application/pkixcmp
-application/postscript				ps ai eps epsi epsf eps2 eps3
-application/prs.alvestrand.titrax-sheet
-application/prs.cww
-application/prs.nprend
-application/qsig
-application/rar					rar
-application/rdf+xml				rdf
-application/remote-printing
-application/riscos
-application/rtf					rtf
-application/sdp
-application/set-payment
-application/set-payment-initiation
-application/set-registration
-application/set-registration-initiation
-application/sgml
-application/sgml-open-catalog
-application/sieve
-application/sla					stl
-application/slate
-application/smil+xml				smi smil
-application/timestamp-query
-application/timestamp-reply
-application/vemmi
-application/whoispp-query
-application/whoispp-response
-application/wita
-application/x400-bp
-application/xhtml+xml				xhtml xht
-application/xml					xml xsd
-application/xml-dtd
-application/xml-external-parsed-entity
-application/xslt+xml				xsl xslt
-application/xspf+xml				xspf
-application/zip					zip
-application/vnd.3M.Post-it-Notes
-application/vnd.accpac.simply.aso
-application/vnd.accpac.simply.imp
-application/vnd.acucobol
-application/vnd.aether.imp
-application/vnd.android.package-archive						apk
-application/vnd.anser-web-certificate-issue-initiation
-application/vnd.anser-web-funds-transfer-initiation
-application/vnd.audiograph
-application/vnd.bmi
-application/vnd.businessobjects
-application/vnd.canon-cpdl
-application/vnd.canon-lips
-application/vnd.cinderella							cdy
-application/vnd.claymore
-application/vnd.commerce-battelle
-application/vnd.commonspace
-application/vnd.comsocaller
-application/vnd.contact.cmsg
-application/vnd.cosmocaller
-application/vnd.ctc-posml
-application/vnd.cups-postscript
-application/vnd.cups-raster
-application/vnd.cups-raw
-application/vnd.cybank
-application/vnd.debian.binary-package						deb ddeb udeb
-application/vnd.dna
-application/vnd.dpgraph
-application/vnd.dxr
-application/vnd.ecdis-update
-application/vnd.ecowin.chart
-application/vnd.ecowin.filerequest
-application/vnd.ecowin.fileupdate
-application/vnd.ecowin.series
-application/vnd.ecowin.seriesrequest
-application/vnd.ecowin.seriesupdate
-application/vnd.enliven
-application/vnd.epson.esf
-application/vnd.epson.msf
-application/vnd.epson.quickanime
-application/vnd.epson.salt
-application/vnd.epson.ssf
-application/vnd.ericsson.quickcall
-application/vnd.eudora.data
-application/vnd.fdf
-application/vnd.ffsns
-application/vnd.flographit
-application/vnd.font-fontforge-sfd						sfd
-application/vnd.framemaker
-application/vnd.fsc.weblaunch
-application/vnd.fujitsu.oasys
-application/vnd.fujitsu.oasys2
-application/vnd.fujitsu.oasys3
-application/vnd.fujitsu.oasysgp
-application/vnd.fujitsu.oasysprs
-application/vnd.fujixerox.ddd
-application/vnd.fujixerox.docuworks
-application/vnd.fujixerox.docuworks.binder
-application/vnd.fut-misnet
-application/vnd.google-earth.kml+xml						kml
-application/vnd.google-earth.kmz						kmz
-application/vnd.grafeq
-application/vnd.groove-account
-application/vnd.groove-identity-message
-application/vnd.groove-injector
-application/vnd.groove-tool-message
-application/vnd.groove-tool-template
-application/vnd.groove-vcard
-application/vnd.hhe.lesson-player
-application/vnd.hp-HPGL
-application/vnd.hp-PCL
-application/vnd.hp-PCLXL
-application/vnd.hp-hpid
-application/vnd.hp-hps
-application/vnd.httphone
-application/vnd.hzn-3d-crossword
-application/vnd.ibm.MiniPay
-application/vnd.ibm.afplinedata
-application/vnd.ibm.modcap
-application/vnd.informix-visionary
-application/vnd.intercon.formnet
-application/vnd.intertrust.digibox
-application/vnd.intertrust.nncp
-application/vnd.intu.qbo
-application/vnd.intu.qfx
-application/vnd.irepository.package+xml
-application/vnd.is-xpr
-application/vnd.japannet-directory-service
-application/vnd.japannet-jpnstore-wakeup
-application/vnd.japannet-payment-wakeup
-application/vnd.japannet-registration
-application/vnd.japannet-registration-wakeup
-application/vnd.japannet-setstore-wakeup
-application/vnd.japannet-verification
-application/vnd.japannet-verification-wakeup
-application/vnd.koan
-application/vnd.lotus-1-2-3
-application/vnd.lotus-approach
-application/vnd.lotus-freelance
-application/vnd.lotus-notes
-application/vnd.lotus-organizer
-application/vnd.lotus-screencam
-application/vnd.lotus-wordpro
-application/vnd.mcd
-application/vnd.mediastation.cdkey
-application/vnd.meridian-slingshot
-application/vnd.mif
-application/vnd.minisoft-hp3000-save
-application/vnd.mitsubishi.misty-guard.trustweb
-application/vnd.mobius.daf
-application/vnd.mobius.dis
-application/vnd.mobius.msl
-application/vnd.mobius.plc
-application/vnd.mobius.txf
-application/vnd.motorola.flexsuite
-application/vnd.motorola.flexsuite.adsi
-application/vnd.motorola.flexsuite.fis
-application/vnd.motorola.flexsuite.gotap
-application/vnd.motorola.flexsuite.kmr
-application/vnd.motorola.flexsuite.ttc
-application/vnd.motorola.flexsuite.wem
-application/vnd.mozilla.xul+xml							xul
-application/vnd.ms-artgalry
-application/vnd.ms-asf
-application/vnd.ms-excel							xls xlb xlt
-application/vnd.ms-excel.addin.macroEnabled.12					xlam
-application/vnd.ms-excel.sheet.binary.macroEnabled.12				xlsb
-application/vnd.ms-excel.sheet.macroEnabled.12					xlsm
-application/vnd.ms-excel.template.macroEnabled.12				xltm
-application/vnd.ms-fontobject							eot
-application/vnd.ms-lrm
-application/vnd.ms-officetheme							thmx
-application/vnd.ms-pki.seccat							cat
-#application/vnd.ms-pki.stl							stl
-application/vnd.ms-powerpoint							ppt pps
-application/vnd.ms-powerpoint.addin.macroEnabled.12				ppam
-application/vnd.ms-powerpoint.presentation.macroEnabled.12			pptm
-application/vnd.ms-powerpoint.slide.macroEnabled.12				sldm
-application/vnd.ms-powerpoint.slideshow.macroEnabled.12				ppsm
-application/vnd.ms-powerpoint.template.macroEnabled.12				potm
-application/vnd.ms-project
-application/vnd.ms-tnef
-application/vnd.ms-word.document.macroEnabled.12				docm
-application/vnd.ms-word.template.macroEnabled.12				dotm
-application/vnd.ms-works
-application/vnd.mseq
-application/vnd.msign
-application/vnd.music-niff
-application/vnd.musician
-application/vnd.netfpx
-application/vnd.noblenet-directory
-application/vnd.noblenet-sealer
-application/vnd.noblenet-web
-application/vnd.novadigm.EDM
-application/vnd.novadigm.EDX
-application/vnd.novadigm.EXT
-application/vnd.oasis.opendocument.chart					odc
-application/vnd.oasis.opendocument.database					odb
-application/vnd.oasis.opendocument.formula					odf
-application/vnd.oasis.opendocument.graphics					odg
-application/vnd.oasis.opendocument.graphics-template				otg
-application/vnd.oasis.opendocument.image					odi
-application/vnd.oasis.opendocument.presentation					odp
-application/vnd.oasis.opendocument.presentation-template			otp
-application/vnd.oasis.opendocument.spreadsheet					ods
-application/vnd.oasis.opendocument.spreadsheet-template				ots
-application/vnd.oasis.opendocument.text						odt
-application/vnd.oasis.opendocument.text-master					odm
-application/vnd.oasis.opendocument.text-template				ott
-application/vnd.oasis.opendocument.text-web					oth
-application/vnd.openxmlformats-officedocument.presentationml.presentation	pptx
-application/vnd.openxmlformats-officedocument.presentationml.slide		sldx
-application/vnd.openxmlformats-officedocument.presentationml.slideshow		ppsx
-application/vnd.openxmlformats-officedocument.presentationml.template		potx
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet		xlsx
-application/vnd.openxmlformats-officedocument.spreadsheetml.template		xltx
-application/vnd.openxmlformats-officedocument.wordprocessingml.document		docx
-application/vnd.openxmlformats-officedocument.wordprocessingml.template		dotx
-application/vnd.osa.netdeploy
-application/vnd.palm
-application/vnd.pg.format
-application/vnd.pg.osasli
-application/vnd.powerbuilder6
-application/vnd.powerbuilder6-s
-application/vnd.powerbuilder7
-application/vnd.powerbuilder7-s
-application/vnd.powerbuilder75
-application/vnd.powerbuilder75-s
-application/vnd.previewsystems.box
-application/vnd.publishare-delta-tree
-application/vnd.pvi.ptid1
-application/vnd.pwg-xhtml-print+xml
-application/vnd.rapid
-application/vnd.rim.cod								cod
-application/vnd.s3sms
-application/vnd.seemail
-application/vnd.shana.informed.formdata
-application/vnd.shana.informed.formtemplate
-application/vnd.shana.informed.interchange
-application/vnd.shana.informed.package
-application/vnd.smaf								mmf
-application/vnd.sss-cod
-application/vnd.sss-dtf
-application/vnd.sss-ntf
-application/vnd.stardivision.calc						sdc
-application/vnd.stardivision.chart						sds
-application/vnd.stardivision.draw						sda
-application/vnd.stardivision.impress						sdd
-application/vnd.stardivision.math						sdf
-application/vnd.stardivision.writer						sdw
-application/vnd.stardivision.writer-global					sgl
-application/vnd.street-stream
-application/vnd.sun.xml.calc							sxc
-application/vnd.sun.xml.calc.template						stc
-application/vnd.sun.xml.draw							sxd
-application/vnd.sun.xml.draw.template						std
-application/vnd.sun.xml.impress							sxi
-application/vnd.sun.xml.impress.template					sti
-application/vnd.sun.xml.math							sxm
-application/vnd.sun.xml.writer							sxw
-application/vnd.sun.xml.writer.global						sxg
-application/vnd.sun.xml.writer.template						stw
-application/vnd.svd
-application/vnd.swiftview-ics
-application/vnd.symbian.install							sis
-application/vnd.tcpdump.pcap							cap pcap
-application/vnd.triscape.mxs
-application/vnd.trueapp
-application/vnd.truedoc
-application/vnd.tve-trigger
-application/vnd.ufdl
-application/vnd.uplanet.alert
-application/vnd.uplanet.alert-wbxml
-application/vnd.uplanet.bearer-choice
-application/vnd.uplanet.bearer-choice-wbxml
-application/vnd.uplanet.cacheop
-application/vnd.uplanet.cacheop-wbxml
-application/vnd.uplanet.channel
-application/vnd.uplanet.channel-wbxml
-application/vnd.uplanet.list
-application/vnd.uplanet.list-wbxml
-application/vnd.uplanet.listcmd
-application/vnd.uplanet.listcmd-wbxml
-application/vnd.uplanet.signal
-application/vnd.vcx
-application/vnd.vectorworks
-application/vnd.vidsoft.vidconference
-application/vnd.visio								vsd vst vsw vss
-application/vnd.vividence.scriptfile
-application/vnd.wap.sic
-application/vnd.wap.slc
-application/vnd.wap.wbxml							wbxml
-application/vnd.wap.wmlc							wmlc
-application/vnd.wap.wmlscriptc							wmlsc
-application/vnd.webturbo
-application/vnd.wordperfect							wpd
-application/vnd.wordperfect5.1							wp5
-application/vnd.wrq-hp3000-labelled
-application/vnd.wt.stf
-application/vnd.xara
-application/vnd.xfdl
-application/vnd.yellowriver-custom-menu
-application/zlib
-application/x-123				wk
-application/x-7z-compressed			7z
-application/x-abiword				abw
-application/x-apple-diskimage			dmg
-application/x-bcpio				bcpio
-application/x-bittorrent			torrent
-application/x-cab				cab
-application/x-cbr				cbr
-application/x-cbz				cbz
-application/x-cdf				cdf cda
-application/x-cdlink				vcd
-application/x-chess-pgn				pgn
-application/x-comsol				mph
-application/x-core
-application/x-cpio				cpio
-application/x-csh				csh
-application/x-debian-package			deb udeb
-application/x-director				dcr dir dxr
-application/x-dms				dms
-application/x-doom				wad
-application/x-dvi				dvi
-application/x-executable
-application/x-font				pfa pfb gsf
-application/x-font-pcf				pcf pcf.Z
-application/x-freemind				mm
-application/x-futuresplash			spl
-application/x-ganttproject			gan
-application/x-gnumeric				gnumeric
-application/x-go-sgf				sgf
-application/x-graphing-calculator		gcf
-application/x-gtar				gtar
-application/x-gtar-compressed			tgz taz
-application/x-hdf				hdf
-#application/x-httpd-eruby			rhtml
-#application/x-httpd-php			phtml pht php
-#application/x-httpd-php-source			phps
-#application/x-httpd-php3			php3
-#application/x-httpd-php3-preprocessed		php3p
-#application/x-httpd-php4			php4
-#application/x-httpd-php5			php5
-application/x-hwp				hwp
-application/x-ica				ica
-application/x-info				info
-application/x-internet-signup			ins isp
-application/x-iphone				iii
-application/x-iso9660-image			iso
-application/x-jam				jam
-application/x-java-applet
-application/x-java-bean
-application/x-java-jnlp-file			jnlp
-application/x-jmol				jmz
-application/x-kchart				chrt
-application/x-kdelnk
-application/x-killustrator			kil
-application/x-koan				skp skd skt skm
-application/x-kpresenter			kpr kpt
-application/x-kspread				ksp
-application/x-kword				kwd kwt
-application/x-latex				latex
-application/x-lha				lha
-application/x-lyx				lyx
-application/x-lzh				lzh
-application/x-lzx				lzx
-application/x-maker				frm maker frame fm fb book fbdoc
-application/x-mif				mif
-application/x-mpegURL				m3u8
-application/x-ms-application			application
-application/x-ms-manifest			manifest
-application/x-ms-wmd				wmd
-application/x-ms-wmz				wmz
-application/x-msdos-program			com exe bat dll
-application/x-msi				msi
-application/x-netcdf				nc
-application/x-ns-proxy-autoconfig		pac
-application/x-nwc				nwc
-application/x-object				o
-application/x-oz-application			oza
-application/x-pkcs7-certreqresp			p7r
-application/x-pkcs7-crl				crl
-application/x-python-code			pyc pyo
-application/x-qgis				qgs shp shx
-application/x-quicktimeplayer			qtl
-application/x-rdp				rdp
-application/x-redhat-package-manager		rpm
-application/x-rss+xml				rss
-application/x-ruby				rb
-application/x-rx
-application/x-scilab				sci sce
-application/x-scilab-xcos			xcos
-application/x-sh				sh
-application/x-shar				shar
-application/x-shellscript
-application/x-shockwave-flash			swf swfl
-application/x-silverlight			scr
-application/x-sql				sql
-application/x-stuffit				sit sitx
-application/x-sv4cpio				sv4cpio
-application/x-sv4crc				sv4crc
-application/x-tar				tar
-application/x-tcl				tcl
-application/x-tex-gf				gf
-application/x-tex-pk				pk
-application/x-texinfo				texinfo texi
-application/x-trash				~ % bak old sik
-application/x-troff				t tr roff
-application/x-troff-man				man
-application/x-troff-me				me
-application/x-troff-ms				ms
-application/x-ustar				ustar
-application/x-videolan
-application/x-wais-source			src
-application/x-wingz				wz
-application/x-x509-ca-cert			crt
-application/x-xcf				xcf
-application/x-xfig				fig
-application/x-xpinstall				xpi
-application/x-xz				xz
-
-audio/32kadpcm
-audio/3gpp
-audio/amr					amr
-audio/amr-wb					awb
-audio/annodex					axa
-audio/basic					au snd
-audio/csound					csd orc sco
-audio/flac					flac
-audio/g.722.1
-audio/l16
-audio/midi					mid midi kar
-audio/mp4a-latm
-audio/mpa-robust
-audio/mpeg					mpga mpega mp2 mp3 m4a
-audio/mpegurl					m3u
-audio/ogg					oga ogg opus spx
-audio/parityfec
-audio/prs.sid					sid
-audio/telephone-event
-audio/tone
-audio/vnd.cisco.nse
-audio/vnd.cns.anp1
-audio/vnd.cns.inf1
-audio/vnd.digital-winds
-audio/vnd.everad.plj
-audio/vnd.lucent.voice
-audio/vnd.nortel.vbk
-audio/vnd.nuera.ecelp4800
-audio/vnd.nuera.ecelp7470
-audio/vnd.nuera.ecelp9600
-audio/vnd.octel.sbc
-audio/vnd.qcelp
-audio/vnd.rhetorex.32kadpcm
-audio/vnd.vmx.cvsd
-audio/x-aiff					aif aiff aifc
-audio/x-gsm					gsm
-audio/x-mpegurl					m3u
-audio/x-ms-wma					wma
-audio/x-ms-wax					wax
-audio/x-pn-realaudio-plugin
-audio/x-pn-realaudio				ra rm ram
-audio/x-realaudio				ra
-audio/x-scpls					pls
-audio/x-sd2					sd2
-audio/x-wav					wav
-
-chemical/x-alchemy				alc
-chemical/x-cache				cac cache
-chemical/x-cache-csf				csf
-chemical/x-cactvs-binary			cbin cascii ctab
-chemical/x-cdx					cdx
-chemical/x-cerius				cer
-chemical/x-chem3d				c3d
-chemical/x-chemdraw				chm
-chemical/x-cif					cif
-chemical/x-cmdf					cmdf
-chemical/x-cml					cml
-chemical/x-compass				cpa
-chemical/x-crossfire				bsd
-chemical/x-csml					csml csm
-chemical/x-ctx					ctx
-chemical/x-cxf					cxf cef
-#chemical/x-daylight-smiles			smi
-chemical/x-embl-dl-nucleotide			emb embl
-chemical/x-galactic-spc				spc
-chemical/x-gamess-input				inp gam gamin
-chemical/x-gaussian-checkpoint			fch fchk
-chemical/x-gaussian-cube			cub
-chemical/x-gaussian-input			gau gjc gjf
-chemical/x-gaussian-log				gal
-chemical/x-gcg8-sequence			gcg
-chemical/x-genbank				gen
-chemical/x-hin					hin
-chemical/x-isostar				istr ist
-chemical/x-jcamp-dx				jdx dx
-chemical/x-kinemage				kin
-chemical/x-macmolecule				mcm
-chemical/x-macromodel-input			mmd mmod
-chemical/x-mdl-molfile				mol
-chemical/x-mdl-rdfile				rd
-chemical/x-mdl-rxnfile				rxn
-chemical/x-mdl-sdfile				sd sdf
-chemical/x-mdl-tgf				tgf
-#chemical/x-mif					mif
-chemical/x-mmcif				mcif
-chemical/x-mol2					mol2
-chemical/x-molconn-Z				b
-chemical/x-mopac-graph				gpt
-chemical/x-mopac-input				mop mopcrt mpc zmt
-chemical/x-mopac-out				moo
-chemical/x-mopac-vib				mvb
-chemical/x-ncbi-asn1				asn
-chemical/x-ncbi-asn1-ascii			prt ent
-chemical/x-ncbi-asn1-binary			val aso
-chemical/x-ncbi-asn1-spec			asn
-chemical/x-pdb					pdb ent
-chemical/x-rosdal				ros
-chemical/x-swissprot				sw
-chemical/x-vamas-iso14976			vms
-chemical/x-vmd					vmd
-chemical/x-xtel					xtel
-chemical/x-xyz					xyz
-
-font/collection					ttc
-font/otf					ttf otf
-font/sfnt					ttf otf
-font/ttf					ttf otf
-font/woff					woff
-font/woff2					woff2
-
-image/cgm
-image/g3fax
-image/gif					gif
-image/ief					ief
-image/jp2					jp2 jpg2
-image/jpeg					jpeg jpg jpe
-image/jpm					jpm
-image/jpx					jpx jpf
-image/naplps
-image/pcx					pcx
-image/png					png
-image/prs.btif
-image/prs.pti
-image/svg+xml					svg svgz
-image/tiff					tiff tif
-image/vnd.cns.inf2
-image/vnd.djvu					djvu djv
-image/vnd.dwg
-image/vnd.dxf
-image/vnd.fastbidsheet
-image/vnd.fpx
-image/vnd.fst
-image/vnd.fujixerox.edmics-mmr
-image/vnd.fujixerox.edmics-rlc
-image/vnd.microsoft.icon			ico
-image/vnd.mix
-image/vnd.net-fpx
-image/vnd.svf
-image/vnd.wap.wbmp				wbmp
-image/vnd.xiff
-image/x-canon-cr2				cr2
-image/x-canon-crw				crw
-image/x-cmu-raster				ras
-image/x-coreldraw				cdr
-image/x-coreldrawpattern			pat
-image/x-coreldrawtemplate			cdt
-image/x-corelphotopaint				cpt
-image/x-epson-erf				erf
-image/x-icon
-image/x-jg					art
-image/x-jng					jng
-image/x-ms-bmp					bmp
-image/x-nikon-nef				nef
-image/x-olympus-orf				orf
-image/x-photoshop				psd
-image/x-portable-anymap				pnm
-image/x-portable-bitmap				pbm
-image/x-portable-graymap			pgm
-image/x-portable-pixmap				ppm
-image/x-rgb					rgb
-image/x-xbitmap					xbm
-image/x-xpixmap					xpm
-image/x-xwindowdump				xwd
-
-inode/chardevice
-inode/blockdevice
-inode/directory-locked
-inode/directory
-inode/fifo
-inode/socket
-
-message/delivery-status
-message/disposition-notification
-message/external-body
-message/http
-message/s-http
-message/news
-message/partial
-message/rfc822					eml
-
-model/iges					igs iges
-model/mesh					msh mesh silo
-model/vnd.dwf
-model/vnd.flatland.3dml
-model/vnd.gdl
-model/vnd.gs-gdl
-model/vnd.gtw
-model/vnd.mts
-model/vnd.vtu
-model/vrml					wrl vrml
-model/x3d+vrml					x3dv
-model/x3d+xml					x3d
-model/x3d+binary				x3db
-
-multipart/alternative
-multipart/appledouble
-multipart/byteranges
-multipart/digest
-multipart/encrypted
-multipart/form-data
-multipart/header-set
-multipart/mixed
-multipart/parallel
-multipart/related
-multipart/report
-multipart/signed
-multipart/voice-message
-
-text/cache-manifest				appcache
-text/calendar					ics icz
-text/css					css
-text/csv					csv
-text/directory
-text/english
-text/enriched
-text/h323					323
-text/html					html htm shtml
-text/iuls					uls
-text/mathml					mml
-text/markdown                                   md markdown
-text/parityfec
-text/plain					asc txt text pot brf srt
-text/prs.lines.tag
-text/rfc822-headers
-text/richtext					rtx
-text/rtf
-text/scriptlet					sct wsc
-text/t140
-text/texmacs					tm
-text/tab-separated-values			tsv
-text/turtle					ttl
-text/uri-list
-text/vcard					vcf vcard
-text/vnd.abc
-text/vnd.curl
-text/vnd.debian.copyright
-text/vnd.DMClientScript
-text/vnd.flatland.3dml
-text/vnd.fly
-text/vnd.fmi.flexstor
-text/vnd.in3d.3dml
-text/vnd.in3d.spot
-text/vnd.IPTC.NewsML
-text/vnd.IPTC.NITF
-text/vnd.latex-z
-text/vnd.motorola.reflex
-text/vnd.ms-mediapackage
-text/vnd.sun.j2me.app-descriptor		jad
-text/vnd.wap.si
-text/vnd.wap.sl
-text/vnd.wap.wml				wml
-text/vnd.wap.wmlscript				wmls
-text/x-bibtex					bib
-text/x-boo					boo
-text/x-c++hdr					h++ hpp hxx hh
-text/x-c++src					c++ cpp cxx cc
-text/x-chdr					h
-text/x-component				htc
-text/x-crontab
-text/x-csh					csh
-text/x-csrc					c
-text/x-dsrc					d
-text/x-diff					diff patch
-text/x-haskell					hs
-text/x-java					java
-text/x-lilypond					ly
-text/x-literate-haskell				lhs
-text/x-makefile
-text/x-moc					moc
-text/x-pascal					p pas
-text/x-pcs-gcd					gcd
-text/x-perl					pl pm
-text/x-python					py
-text/x-scala					scala
-text/x-server-parsed-html
-text/x-setext					etx
-text/x-sfv					sfv
-text/x-sh					sh
-text/x-tcl					tcl tk
-text/x-tex					tex ltx sty cls
-text/x-vcalendar				vcs
-
-video/3gpp					3gp
-video/annodex					axv
-video/dl					dl
-video/dv					dif dv
-video/fli					fli
-video/gl					gl
-video/mpeg					mpeg mpg mpe
-video/MP2T					ts
-video/mp4					mp4
-video/quicktime					qt mov
-video/mp4v-es
-video/ogg					ogv
-video/parityfec
-video/pointer
-video/webm					webm
-video/vnd.fvt
-video/vnd.motorola.video
-video/vnd.motorola.videop
-video/vnd.mpegurl				mxu
-video/vnd.mts
-video/vnd.nokia.interleaved-multimedia
-video/vnd.vivo
-video/x-flv					flv
-video/x-la-asf					lsf lsx
-video/x-mng					mng
-video/x-ms-asf					asf asx
-video/x-ms-wm					wm
-video/x-ms-wmv					wmv
-video/x-ms-wmx					wmx
-video/x-ms-wvx					wvx
-video/x-msvideo					avi
-video/x-sgi-movie				movie
-video/x-matroska				mpv mkv
-
-x-conference/x-cooltalk				ice
-
-x-epoc/x-sisx-app				sisx
-x-world/x-vrml					vrm vrml wrl
diff --git a/luni/src/main/java/libcore/net/mime.types.README b/luni/src/main/java/libcore/net/mime.types.README
deleted file mode 100644
index a9707b7..0000000
--- a/luni/src/main/java/libcore/net/mime.types.README
+++ /dev/null
@@ -1,13 +0,0 @@
-Debian is the upstream for this mapping file:
-https://salsa.debian.org/debian/mime-support
-
-Last updated to version debian/3.61 (commit
-d4bbcca4ba04582ad1d253d82fc139bb23841a43).
-
-Copyright: public-domain
-License: ad-hoc
- This package was written by Brian White <bcwhite@pobox.com> and others.
- It contains public information compiled from around the 'net and many people.
- .
- The "update-mime" program was written by Brian White and has been
- placed in the public domain.
diff --git a/luni/src/main/java/libcore/timezone/TimeZoneDataFiles.java b/luni/src/main/java/libcore/timezone/TimeZoneDataFiles.java
index a571ec7..d95ff50 100644
--- a/luni/src/main/java/libcore/timezone/TimeZoneDataFiles.java
+++ b/luni/src/main/java/libcore/timezone/TimeZoneDataFiles.java
@@ -27,7 +27,7 @@
 @libcore.api.CorePlatformApi
 public final class TimeZoneDataFiles {
     private static final String ANDROID_ROOT_ENV = "ANDROID_ROOT";
-    private static final String ANDROID_RUNTIME_ROOT_ENV = "ANDROID_RUNTIME_ROOT";
+    private static final String ANDROID_I18N_ROOT_ENV = "ANDROID_I18N_ROOT";
     private static final String ANDROID_TZDATA_ROOT_ENV = "ANDROID_TZDATA_ROOT";
     private static final String ANDROID_DATA_ENV = "ANDROID_DATA";
 
@@ -79,12 +79,12 @@
         return System.getenv(ANDROID_TZDATA_ROOT_ENV) + "/etc/" + fileName;
     }
 
-    public static String getRuntimeModuleIcuFile(String fileName) {
-        return getRuntimeModuleFile("icu/" + fileName);
+    public static String getI18nModuleIcuFile(String fileName) {
+        return getI18nModuleFile("icu/" + fileName);
     }
 
-    private static String getRuntimeModuleFile(String fileName) {
-        return System.getenv(ANDROID_RUNTIME_ROOT_ENV) + "/etc/" + fileName;
+    private static String getI18nModuleFile(String fileName) {
+        return System.getenv(ANDROID_I18N_ROOT_ENV) + "/etc/" + fileName;
     }
 
     public static String getSystemTzFile(String fileName) {
@@ -114,10 +114,10 @@
         String timeZoneModuleIcuDataPath = getTimeZoneModuleIcuFile("");
         paths.add(timeZoneModuleIcuDataPath);
 
-        // ICU should always look in the runtime module path as this is where most of the data
+        // ICU should always look in the i18n module path as this is where most of the data
         // can be found.
-        String runtimeModuleIcuDataPath = getRuntimeModuleIcuFile("");
-        paths.add(runtimeModuleIcuDataPath);
+        String i18nModuleIcuDataPath = getI18nModuleIcuFile("");
+        paths.add(i18nModuleIcuDataPath);
 
         return String.join(":", paths);
     }
diff --git a/luni/src/test/java/libcore/java/lang/PackageTest.java b/luni/src/test/java/libcore/java/lang/PackageTest.java
index 672af5d..68f3b5d 100644
--- a/luni/src/test/java/libcore/java/lang/PackageTest.java
+++ b/luni/src/test/java/libcore/java/lang/PackageTest.java
@@ -22,9 +22,11 @@
 import libcore.junit.junit3.TestCaseWithRules;
 import libcore.junit.util.SwitchTargetSdkVersionRule;
 import libcore.junit.util.SwitchTargetSdkVersionRule.TargetSdkVersion;
+import libcore.testing.categories.Example;
 import org.junit.Rule;
 import org.junit.rules.TestRule;
 
+@Example
 public final class PackageTest extends TestCaseWithRules {
 
     @Rule
diff --git a/luni/src/test/java/libcore/java/util/ComparatorTest.java b/luni/src/test/java/libcore/java/util/ComparatorTest.java
index a636ea6..6516df5 100644
--- a/luni/src/test/java/libcore/java/util/ComparatorTest.java
+++ b/luni/src/test/java/libcore/java/util/ComparatorTest.java
@@ -16,6 +16,7 @@
 
 package libcore.java.util;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
@@ -35,17 +36,22 @@
     private static final Item ONEZERO = new Item(1, 0);
     private static final Item ONEONE = new Item(1, 1);
 
-    private static final Item[] orderedItems = new Item[]{ZERO, ONE, TWO, THREE, FOUR};
-    private static final Item[] nullsFirstItems = new Item[]{null, ZERO, ONE, TWO, THREE, FOUR};
-    private static final Item[] nullsLastItems = new Item[]{ZERO, ONE, TWO, THREE, FOUR, null};
-    private static final Item[] orderedItemsMatrix = new Item[]{ZEROZERO, ZEROONE, ONEZERO, ONEONE};
+    private final List<Item> orderedItems = listOf(ZERO, ONE, TWO, THREE, FOUR);
+    private final List<Item> nullsFirstItems = listOf(null, ZERO, ONE, TWO, THREE, FOUR);
+    private final List<Item> nullsLastItems = listOf(ZERO, ONE, TWO, THREE, FOUR, null);
+    private final List<Item> orderedItemsMatrix = listOf(ZEROZERO, ZEROONE, ONEZERO, ONEONE);
 
-    private <T> void checkComparison(Comparator<T> comparator, T[] items) {
-        for (int i = 0; i < items.length - 1; ++i) {
-            assertEquals(0, comparator.compare(items[i], items[i]));
-            for (int j = i + 1; j < items.length; ++j) {
-                assertTrue(comparator.compare(items[i], items[j]) < 0);
-                assertTrue(comparator.compare(items[j], items[i]) > 0);
+    private static<T> List<T> listOf(T... values) {
+        return Collections.unmodifiableList(Arrays.asList(values));
+    }
+
+    private <T> void checkComparison(Comparator<T> comparator, List<T> items) {
+        for (int i = 0; i < items.size() - 1; ++i) {
+            T a = items.get(i);
+            assertEquals(0, comparator.compare(a, a));
+            for (T b : items.subList(i+1, items.size())) {
+                assertTrue(comparator.compare(a, b) < 0);
+                assertTrue(comparator.compare(b, a) > 0);
             }
         }
     }
@@ -83,10 +89,11 @@
     }
 
     public void testReverseOrder() {
-        List<Item> itemsList = Arrays.asList(orderedItems);
+        // Make a copy that we can reverse. http://b/139015474
+        List<Item> itemsList = new ArrayList<>(orderedItems);
         Collections.reverse(itemsList);
         Comparator<Item> comparator = Comparator.reverseOrder();
-        checkComparison(comparator, (Item[]) itemsList.toArray());
+        checkComparison(comparator, itemsList);
     }
 
     public void testReverse() {
diff --git a/luni/src/test/java/libcore/java/util/LocaleTest.java b/luni/src/test/java/libcore/java/util/LocaleTest.java
index 33e427c..3efe94e 100644
--- a/luni/src/test/java/libcore/java/util/LocaleTest.java
+++ b/luni/src/test/java/libcore/java/util/LocaleTest.java
@@ -156,12 +156,12 @@
 
     public void test_getDisplayCountry_8870289() throws Exception {
         assertEquals("Hong Kong", new Locale("", "HK").getDisplayCountry(Locale.US));
-        assertEquals("Macau", new Locale("", "MO").getDisplayCountry(Locale.US));
+        assertEquals("Macao", new Locale("", "MO").getDisplayCountry(Locale.US));
         assertEquals("Palestine", new Locale("", "PS").getDisplayCountry(Locale.US));
 
         assertEquals("Cocos (Keeling) Islands", new Locale("", "CC").getDisplayCountry(Locale.US));
         assertEquals("Falkland Islands (Islas Malvinas)", new Locale("", "FK").getDisplayCountry(Locale.US));
-        assertEquals("Macedonia (FYROM)", new Locale("", "MK").getDisplayCountry(Locale.US));
+        assertEquals("North Macedonia", new Locale("", "MK").getDisplayCountry(Locale.US));
         assertEquals("Myanmar (Burma)", new Locale("", "MM").getDisplayCountry(Locale.US));
         assertEquals("Taiwan", new Locale("", "TW").getDisplayCountry(Locale.US));
     }
diff --git a/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java b/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
index b23e33d..3470eb8 100644
--- a/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
+++ b/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
@@ -281,8 +281,8 @@
         }
 
         String icuDatFileName = "icudt" + VersionInfo.ICU_VERSION.getMajor() + "l.dat";
-        String runtimeModuleIcuData = TimeZoneDataFiles.getRuntimeModuleIcuFile(icuDatFileName);
-        assertFileExists(runtimeModuleIcuData);
+        String i18nModuleIcuData = TimeZoneDataFiles.getI18nModuleIcuFile(icuDatFileName);
+        assertFileExists(i18nModuleIcuData);
 
         // Devices currently have a subset of the time zone files in /system. These are going away
         // but we test them while they exist. Host ART should match device.
@@ -300,7 +300,7 @@
         // exists we can say it should resolve (realpath) to the same file as the runtime module.
         String systemIcuData = TimeZoneDataFiles.getSystemIcuFile(icuDatFileName);
         if (new File(systemIcuData).exists()) {
-            assertEquals(Os.realpath(runtimeModuleIcuData), Os.realpath(systemIcuData));
+            assertEquals(Os.realpath(i18nModuleIcuData), Os.realpath(systemIcuData));
         }
     }
 
diff --git a/luni/src/test/java/libcore/libcore/timezone/TimeZoneDataFilesTest.java b/luni/src/test/java/libcore/libcore/timezone/TimeZoneDataFilesTest.java
index 14eb74d..282b18e 100644
--- a/luni/src/test/java/libcore/libcore/timezone/TimeZoneDataFilesTest.java
+++ b/luni/src/test/java/libcore/libcore/timezone/TimeZoneDataFilesTest.java
@@ -27,13 +27,13 @@
 public class TimeZoneDataFilesTest {
 
     private static final String ANDROID_TZDATA_ROOT_ENV = "ANDROID_TZDATA_ROOT";
-    private static final String ANDROID_RUNTIME_ROOT_ENV = "ANDROID_RUNTIME_ROOT";
+    private static final String ANDROID_I18N_ROOT_ENV = "ANDROID_I18N_ROOT";
 
     @Test
     public void expectedEnvironmentVariables() {
         // These environment variables are required to locate data files used by libcore / ICU.
         assertNotNull(System.getenv(ANDROID_TZDATA_ROOT_ENV));
-        assertNotNull(System.getenv(ANDROID_RUNTIME_ROOT_ENV));
+        assertNotNull(System.getenv(ANDROID_I18N_ROOT_ENV));
     }
 
     @Test
@@ -66,7 +66,7 @@
 
         String runtimeModulePath = paths[2];
         assertTrue(runtimeModulePath + " invalid",
-                runtimeModulePath.startsWith(System.getenv(ANDROID_RUNTIME_ROOT_ENV)));
+                runtimeModulePath.startsWith(System.getenv(ANDROID_I18N_ROOT_ENV)));
         assertTrue(runtimeModulePath + " invalid", runtimeModulePath.contains("/etc/icu"));
     }
 }
diff --git a/luni/src/test/java/tests/security/cert/CertPathBuilder1Test.java b/luni/src/test/java/tests/security/cert/CertPathBuilder1Test.java
index aae021b..20597db 100644
--- a/luni/src/test/java/tests/security/cert/CertPathBuilder1Test.java
+++ b/luni/src/test/java/tests/security/cert/CertPathBuilder1Test.java
@@ -22,8 +22,6 @@
 
 package tests.security.cert;
 
-import dalvik.annotation.KnownFailure;
-
 import org.apache.harmony.security.tests.support.SpiEngUtils;
 import org.apache.harmony.security.tests.support.cert.MyCertPathBuilderSpi;
 import org.apache.harmony.security.tests.support.cert.TestUtils;
@@ -316,8 +314,6 @@
         }
     }
 
-    // Test passed on RI
-    @KnownFailure(value="expired certificate bug 2322662")
     public void testBuild() throws Exception {
         TestUtils.initCertPathSSCertChain();
         CertPathParameters params = TestUtils.getCertPathParameters();
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
index e3b8d9c..c1f808f 100644
--- a/mmodules/core_platform_api/api/platform/current-api.txt
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
@@ -815,6 +815,7 @@
 
   public final class VMRuntime {
     method @dalvik.annotation.compat.UnsupportedAppUsage @dalvik.annotation.optimization.FastNative public long addressOf(Object);
+    method public static void bootCompleted();
     method public void clampGrowthLimit();
     method @dalvik.annotation.compat.UnsupportedAppUsage public void clearGrowthLimit();
     method public static boolean didPruneDalvikCache();
diff --git a/mmodules/intracoreapi/Android.bp b/mmodules/intracoreapi/Android.bp
index fab9d83..dc0099a 100644
--- a/mmodules/intracoreapi/Android.bp
+++ b/mmodules/intracoreapi/Android.bp
@@ -71,13 +71,14 @@
     libs: ["core.intra.stubs"],
 }
 
-// A rule that checks we can build core-libart and core-oj using only the source
-// for core-libart and core-oj and the APIs in core-intra-stubs. This proves we
-// don't actually depend on things from (for example) conscrypt we haven't added
-// to the intra-core API.
+// A rule that checks we can build core-icu4j, core-libart and core-oj using only
+// the source for core-libart and core-oj and the APIs in core-intra-stubs.
+// This proves we don't actually depend on things from (for example) conscrypt we
+// haven't added to the intra-core API.
 java_library {
     name: "core-libart-oj.depscheck",
     srcs: [
+        ":android_icu4j_src_files",
         ":core_libart_java_files",
         ":core_oj_java_files",
     ],
diff --git a/mmodules/intracoreapi/api/intra/current-api.txt b/mmodules/intracoreapi/api/intra/current-api.txt
index 7403138..b18a170 100644
--- a/mmodules/intracoreapi/api/intra/current-api.txt
+++ b/mmodules/intracoreapi/api/intra/current-api.txt
@@ -103,135 +103,81 @@
     ctor @libcore.api.IntraCoreApi public OAEPParameters();
   }
 
+  @libcore.api.IntraCoreApi public abstract class OpenSSLAeadCipher extends com.android.org.conscrypt.OpenSSLCipher {
+  }
+
+  @libcore.api.IntraCoreApi public abstract class OpenSSLAeadCipherAES extends com.android.org.conscrypt.OpenSSLAeadCipher {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM extends com.android.org.conscrypt.OpenSSLAeadCipherAES {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM.AES_128 extends com.android.org.conscrypt.OpenSSLAeadCipherAES.GCM {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM.AES_128();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM.AES_256 extends com.android.org.conscrypt.OpenSSLAeadCipherAES.GCM {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM.AES_256();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM_SIV extends com.android.org.conscrypt.OpenSSLAeadCipherAES {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM_SIV();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM_SIV.AES_128 extends com.android.org.conscrypt.OpenSSLAeadCipherAES.GCM_SIV {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM_SIV.AES_128();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLAeadCipherAES.GCM_SIV.AES_256 extends com.android.org.conscrypt.OpenSSLAeadCipherAES.GCM_SIV {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherAES.GCM_SIV.AES_256();
+  }
+
+  @libcore.api.IntraCoreApi public class OpenSSLAeadCipherChaCha20 extends com.android.org.conscrypt.OpenSSLAeadCipher {
+    ctor @libcore.api.IntraCoreApi public OpenSSLAeadCipherChaCha20();
+  }
+
   @libcore.api.IntraCoreApi public abstract class OpenSSLCipher extends javax.crypto.CipherSpi {
   }
 
-  @libcore.api.IntraCoreApi public abstract static class OpenSSLCipher.EVP_AEAD extends com.android.org.conscrypt.OpenSSLCipher {
-  }
-
-  @libcore.api.IntraCoreApi public abstract static class OpenSSLCipher.EVP_AEAD.AES extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_AEAD.AES.GCM extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_AEAD.AES.GCM();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_AEAD.AES.GCM.AES_128 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES.GCM {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_AEAD.AES.GCM.AES_128();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_AEAD.AES.GCM.AES_256 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD.AES.GCM {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_AEAD.AES.GCM.AES_256();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_AEAD.ChaCha20 extends com.android.org.conscrypt.OpenSSLCipher.EVP_AEAD {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_AEAD.ChaCha20();
-  }
-
-  @libcore.api.IntraCoreApi public abstract static class OpenSSLCipher.EVP_CIPHER extends com.android.org.conscrypt.OpenSSLCipher {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES.CBC.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES.CBC.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.CTR extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES.CTR();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES.ECB.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES.ECB.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128 {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_128.CBC.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_128.CBC.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128 {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_128.ECB.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_128.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_128.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_128.ECB.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256 {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_256.CBC.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_256.CBC.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256 {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_256.ECB.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.AES_256.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.AES_256.ECB {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.AES_256.ECB.PKCS5Padding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.ARC4 extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.ARC4();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.DESEDE extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE {
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.NoPadding();
-  }
-
-  @libcore.api.IntraCoreApi public static class OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLCipher.EVP_CIPHER.DESEDE.CBC {
-    ctor @libcore.api.IntraCoreApi public OpenSSLCipher.EVP_CIPHER.DESEDE.CBC.PKCS5Padding();
-  }
-
   @libcore.api.IntraCoreApi public class OpenSSLCipherChaCha20 extends com.android.org.conscrypt.OpenSSLCipher {
     ctor @libcore.api.IntraCoreApi public OpenSSLCipherChaCha20();
   }
 
+  @libcore.api.IntraCoreApi public abstract class OpenSSLCipherRSA extends javax.crypto.CipherSpi {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLCipherRSA.OAEP extends com.android.org.conscrypt.OpenSSLCipherRSA {
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.OAEP.SHA1 extends com.android.org.conscrypt.OpenSSLCipherRSA.OAEP {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.OAEP.SHA1();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.OAEP.SHA224 extends com.android.org.conscrypt.OpenSSLCipherRSA.OAEP {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.OAEP.SHA224();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.OAEP.SHA256 extends com.android.org.conscrypt.OpenSSLCipherRSA.OAEP {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.OAEP.SHA256();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.OAEP.SHA384 extends com.android.org.conscrypt.OpenSSLCipherRSA.OAEP {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.OAEP.SHA384();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.OAEP.SHA512 extends com.android.org.conscrypt.OpenSSLCipherRSA.OAEP {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.OAEP.SHA512();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.PKCS1 extends com.android.org.conscrypt.OpenSSLCipherRSA {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.PKCS1();
+  }
+
+  @libcore.api.IntraCoreApi public static final class OpenSSLCipherRSA.Raw extends com.android.org.conscrypt.OpenSSLCipherRSA {
+    ctor @libcore.api.IntraCoreApi public OpenSSLCipherRSA.Raw();
+  }
+
   @libcore.api.IntraCoreApi public abstract class OpenSSLContextImpl extends javax.net.ssl.SSLContextSpi {
   }
 
@@ -263,6 +209,109 @@
     ctor @libcore.api.IntraCoreApi public OpenSSLECKeyPairGenerator();
   }
 
+  @libcore.api.IntraCoreApi public abstract class OpenSSLEvpCipher extends com.android.org.conscrypt.OpenSSLCipher {
+  }
+
+  @libcore.api.IntraCoreApi public abstract class OpenSSLEvpCipherAES extends com.android.org.conscrypt.OpenSSLEvpCipher {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES extends com.android.org.conscrypt.OpenSSLEvpCipherAES {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.CBC extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES.CBC.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES.CBC.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.CTR extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES.CTR();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.ECB extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES.ECB.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES.ECB.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128 extends com.android.org.conscrypt.OpenSSLEvpCipherAES {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.CBC extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128 {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_128.CBC.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_128.CBC.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.ECB extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128 {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_128.ECB.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_128.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_128.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_128.ECB.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256 extends com.android.org.conscrypt.OpenSSLEvpCipherAES {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.CBC extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256 {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_256.CBC.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_256.CBC.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.ECB extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256 {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.ECB.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_256.ECB.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherAES.AES_256.ECB.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherAES.AES_256.ECB {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherAES.AES_256.ECB.PKCS5Padding();
+  }
+
+  @libcore.api.IntraCoreApi public class OpenSSLEvpCipherARC4 extends com.android.org.conscrypt.OpenSSLEvpCipher {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherARC4();
+  }
+
+  @libcore.api.IntraCoreApi public abstract class OpenSSLEvpCipherDESEDE extends com.android.org.conscrypt.OpenSSLEvpCipher {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherDESEDE.CBC extends com.android.org.conscrypt.OpenSSLEvpCipherDESEDE {
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherDESEDE.CBC.NoPadding extends com.android.org.conscrypt.OpenSSLEvpCipherDESEDE.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherDESEDE.CBC.NoPadding();
+  }
+
+  @libcore.api.IntraCoreApi public static class OpenSSLEvpCipherDESEDE.CBC.PKCS5Padding extends com.android.org.conscrypt.OpenSSLEvpCipherDESEDE.CBC {
+    ctor @libcore.api.IntraCoreApi public OpenSSLEvpCipherDESEDE.CBC.PKCS5Padding();
+  }
+
   @libcore.api.IntraCoreApi public abstract class OpenSSLMac extends javax.crypto.MacSpi {
   }
 
diff --git a/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
index ab1f94e..2146d2f 100644
--- a/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
@@ -63,7 +63,7 @@
 protected java.io.FileDescriptor getFileDescriptor() { throw new RuntimeException("Stub!"); }
 
 @libcore.api.CorePlatformApi
-public FileDescriptor getFD$() { throw new RuntimeException("Stub!"); }
+public java.io.FileDescriptor getFD$() { throw new RuntimeException("Stub!"); }
 
 protected java.net.InetAddress getInetAddress() { 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 4b5b841..d964aad 100644
--- a/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/lang/reflect/Executable.annotated.java
@@ -61,7 +61,7 @@
 
 public abstract java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] @libcore.util.NonNull [] getParameterAnnotations();
 
-@libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.util.NonNull getjava.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(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new RuntimeException("Stub!"); }
 
diff --git a/ojluni/annotations/sdk/nullability/java/util/HashMap.annotated.java b/ojluni/annotations/sdk/nullability/java/util/HashMap.annotated.java
index 567354a..3bcc489 100644
--- a/ojluni/annotations/sdk/nullability/java/util/HashMap.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/util/HashMap.annotated.java
@@ -74,11 +74,11 @@
 
 @libcore.util.Nullable public V computeIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull java.util.function.Function<? super @libcore.util.NullFromTypeParam K,? extends @libcore.util.Nullable V> mappingFunction) { throw new RuntimeException("Stub!"); }
 
-@libcore.util.Nullable public V computeIfPresent(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull java.util.function.BiFunction<? super @libcore.util.NullFromTypeParam K,? super @libcore.util.NonNull V,? extends Nu V> remappingFunction) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public V computeIfPresent(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull java.util.function.BiFunction<? super @libcore.util.NullFromTypeParam K,? super @libcore.util.NonNull V,? extends @libcore.util.Nullable V> remappingFunction) { throw new RuntimeException("Stub!"); }
 
 @libcore.util.Nullable public V compute(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull java.util.function.BiFunction<? super @libcore.util.NullFromTypeParam K,? super @libcore.util.Nullable V,? extends @libcore.util.Nullable V> remappingFunction) { throw new RuntimeException("Stub!"); }
 
-@libcore.util.Nullable public V merge(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull V value, @libcore.util.NonNull java.util.function.BiFunction<? super Nn V,? super @libcore.util.NonNull V,? extends @libcore.util.Nullable V> remappingFunction) { throw new RuntimeException("Stub!"); }
+@libcore.util.Nullable public V merge(@libcore.util.NullFromTypeParam K key, @libcore.util.NonNull V value, @libcore.util.NonNull java.util.function.BiFunction<? super @libcore.util.NonNull V,? super @libcore.util.NonNull V,? extends @libcore.util.Nullable V> remappingFunction) { throw new RuntimeException("Stub!"); }
 
 public void forEach(@libcore.util.NonNull java.util.function.BiConsumer<? super @libcore.util.NullFromTypeParam K,? super @libcore.util.NullFromTypeParam V> action) { throw new RuntimeException("Stub!"); }
 
diff --git a/ojluni/annotations/sdk/nullability/java/util/logging/Logger.annotated.java b/ojluni/annotations/sdk/nullability/java/util/logging/Logger.annotated.java
index 2ad4bfb..f3a25cb 100644
--- a/ojluni/annotations/sdk/nullability/java/util/logging/Logger.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/util/logging/Logger.annotated.java
@@ -75,7 +75,7 @@
 
 public void logp(@libcore.util.NonNull java.util.logging.Level level, @libcore.util.Nullable java.lang.String sourceClass, @libcore.util.Nullable java.lang.String sourceMethod, @libcore.util.Nullable java.lang.String msg, @libcore.util.Nullable java.lang.Object param1) { throw new RuntimeException("Stub!"); }
 
-public void logp(@libcore.util.NonNull java.util.logging.Level level, @libcore.util.Nullable java.lang.String sourceClass, @libcore.util.Nullable java.lang.String sourceMethod, @libcore.util.Nullable java.lang.String msg, java.lang.@libcore.util.Nullable Object @Nu [] params) { throw new RuntimeException("Stub!"); }
+public void logp(@libcore.util.NonNull java.util.logging.Level level, @libcore.util.Nullable java.lang.String sourceClass, @libcore.util.Nullable java.lang.String sourceMethod, @libcore.util.Nullable java.lang.String msg, java.lang.@libcore.util.Nullable Object @libcore.util.Nullable [] params) { throw new RuntimeException("Stub!"); }
 
 public void logp(@libcore.util.NonNull java.util.logging.Level level, @libcore.util.Nullable java.lang.String sourceClass, @libcore.util.Nullable java.lang.String sourceMethod, @libcore.util.Nullable java.lang.String msg, @libcore.util.Nullable java.lang.Throwable thrown) { throw new RuntimeException("Stub!"); }
 
diff --git a/openjdk_java_files.bp b/openjdk_java_files.bp
index f79658e..d1ddf04 100644
--- a/openjdk_java_files.bp
+++ b/openjdk_java_files.bp
@@ -1444,7 +1444,6 @@
         "ojluni/src/main/java/sun/misc/CEStreamExhausted.java",
         "ojluni/src/main/java/sun/misc/CharacterDecoder.java",
         "ojluni/src/main/java/sun/misc/CharacterEncoder.java",
-        "ojluni/src/main/java/sun/misc/Cleaner.java",
         "ojluni/src/main/java/sun/misc/CompoundEnumeration.java",
         "ojluni/src/main/java/sun/misc/DoubleConsts.java",
         "ojluni/src/main/java/sun/misc/FileURLMapper.java",
@@ -1524,7 +1523,6 @@
         "ojluni/src/main/java/sun/nio/ch/DatagramSocketAdaptor.java",
         "ojluni/src/main/java/sun/nio/ch/DefaultAsynchronousChannelProvider.java",
         "ojluni/src/main/java/sun/nio/ch/DefaultSelectorProvider.java",
-        "ojluni/src/main/java/sun/nio/ch/DirectBuffer.java",
         "ojluni/src/main/java/sun/nio/ch/EPoll.java",
         "ojluni/src/main/java/sun/nio/ch/EPollPort.java",
         "ojluni/src/main/java/sun/nio/ch/ExtendedSocketOption.java",
@@ -1634,13 +1632,10 @@
         "ojluni/src/main/java/sun/security/jca/JCAUtil.java",
         "ojluni/src/main/java/sun/security/jca/ProviderConfig.java",
         "ojluni/src/main/java/sun/security/jca/ProviderList.java",
-        "ojluni/src/main/java/sun/security/jca/Providers.java",
         "ojluni/src/main/java/sun/security/jca/ServiceId.java",
-        "ojluni/src/main/java/sun/security/pkcs/PKCS7.java",
         "ojluni/src/main/java/sun/security/pkcs/PKCS8Key.java",
         "ojluni/src/main/java/sun/security/pkcs/PKCS9Attribute.java",
         "ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java",
-        "ojluni/src/main/java/sun/security/pkcs/SignerInfo.java",
         "ojluni/src/main/java/sun/security/pkcs/SigningCertificateInfo.java",
         "ojluni/src/main/java/sun/security/provider/CertPathProvider.java",
         "ojluni/src/main/java/sun/security/provider/certpath/AdaptableX509CertSelector.java",
diff --git a/support/src/test/java/libcore/java/security/StandardNames.java b/support/src/test/java/libcore/java/security/StandardNames.java
index eb9cf45..d53117b 100644
--- a/support/src/test/java/libcore/java/security/StandardNames.java
+++ b/support/src/test/java/libcore/java/security/StandardNames.java
@@ -510,6 +510,7 @@
             provide("Cipher", "AES/ECB/PKCS5PADDING");
             provide("Cipher", "AES/ECB/PKCS7PADDING");
             provide("Cipher", "AES/GCM/NOPADDING");
+            provide("Cipher", "AES/GCM-SIV/NOPADDING");
             provide("Cipher", "AES/OFB/NOPADDING");
             provide("Cipher", "AES/OFB/PKCS5PADDING");
             provide("Cipher", "AES/OFB/PKCS7PADDING");
@@ -520,6 +521,7 @@
             provide("Cipher", "AES_128/ECB/PKCS5PADDING");
             provide("Cipher", "AES_128/ECB/PKCS7PADDING");
             provide("Cipher", "AES_128/GCM/NOPADDING");
+            provide("Cipher", "AES_128/GCM-SIV/NOPADDING");
             provide("Cipher", "AES_256/CBC/NOPADDING");
             provide("Cipher", "AES_256/CBC/PKCS5PADDING");
             provide("Cipher", "AES_256/CBC/PKCS7PADDING");
@@ -527,6 +529,7 @@
             provide("Cipher", "AES_256/ECB/PKCS5PADDING");
             provide("Cipher", "AES_256/ECB/PKCS7PADDING");
             provide("Cipher", "AES_256/GCM/NOPADDING");
+            provide("Cipher", "AES_256/GCM-SIV/NOPADDING");
             provide("Cipher", "DESEDE/CBC/NOPADDING");
             provide("Cipher", "DESEDE/CBC/PKCS5PADDING");
             provide("Cipher", "DESEDE/CBC/PKCS7PADDING");
diff --git a/support/src/test/java/libcore/testing/categories/Example.java b/support/src/test/java/libcore/testing/categories/Example.java
new file mode 100644
index 0000000..92fa44d
--- /dev/null
+++ b/support/src/test/java/libcore/testing/categories/Example.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2019 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 libcore.testing.categories;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * An example of an annotation used to indicate a particular category of tests. This can be used in
+ * a {@code TEST_MAPPING} via the {@code include-annotation} option.
+ */
+// TODO(b/130283485): Remove this once the example has served its purpose.
+@Documented
+@Retention(RUNTIME)
+@Target({TYPE, METHOD})
+public @interface Example {}
diff --git a/tools/upstream/src/main/java/libcore/CompareUpstreams.java b/tools/upstream/src/main/java/libcore/CompareUpstreams.java
index ca17f67..bdd2364 100644
--- a/tools/upstream/src/main/java/libcore/CompareUpstreams.java
+++ b/tools/upstream/src/main/java/libcore/CompareUpstreams.java
@@ -69,6 +69,17 @@
  */
 public class CompareUpstreams {
 
+    /**
+     * Whether to compare against snapshots based on (a) the output of {@link CopyUpstreamFiles},
+     * as opposed to (b) directly against checked-out upstream source {@link Repository}s.
+     *
+     * Because the snapshots are currently kept on x20 which is slow to access, (b) run much
+     * faster (a few seconds vs. 30 minutes), but it requires the checked-out and compiled
+     * upstream repositories to exist which is not the case for everyone / not easily achievable
+     * (OpenJDK 8 requires an old C++ compiler to build).
+     */
+    public static final boolean COMPARE_AGAINST_UPSTREAM_SNAPSHOT = true;
+
     private final StandardRepositories standardRepositories;
 
     public CompareUpstreams(StandardRepositories standardRepositories) {
@@ -153,6 +164,11 @@
         }
         headers.add("diff");
         printTsv(out, headers);
+
+        Path snapshotRoot = COMPARE_AGAINST_UPSTREAM_SNAPSHOT
+                ? Util.pathFromEnvOrThrow("OJLUNI_UPSTREAMS")
+                : null;
+
         for (Path relPath : relPaths) {
             Repository expectedUpstream = standardRepositories.referenceUpstreamAsOfAndroidP(
                 relPath);
@@ -167,7 +183,15 @@
             List<String> comparisons = new ArrayList<>(upstreams.size());
             for (Repository upstream : upstreams) {
                 final String comparison;
-                Path upstreamFile = upstream.absolutePath(relPath);
+                final Path upstreamFile;
+                if (COMPARE_AGAINST_UPSTREAM_SNAPSHOT) {
+                    Path maybePath = snapshotRoot
+                            .resolve(upstream.name())
+                            .resolve(relPath);
+                    upstreamFile = maybePath.toFile().exists() ? maybePath : null;
+                } else {
+                    upstreamFile = upstream.absolutePath(relPath);
+                }
                 if (upstreamFile == null) {
                     comparison = "missing";
                 } else {
diff --git a/tools/upstream/src/main/java/libcore/Repository.java b/tools/upstream/src/main/java/libcore/Repository.java
index 89f64f0..4c7bbd7 100644
--- a/tools/upstream/src/main/java/libcore/Repository.java
+++ b/tools/upstream/src/main/java/libcore/Repository.java
@@ -27,6 +27,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
+import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -232,18 +234,19 @@
          */
         public List<Path> loadRelPathsFromBlueprint() throws IOException {
             List<Path> result = new ArrayList<>();
-            result.addAll(loadRelPathsFromBlueprint(
+            result.addAll(loadOrderedRelPathsSetFromBlueprint(
                 "openjdk_java_files.bp", "\"ojluni/src/main/java/(.+\\.java)\""));
-            result.addAll(loadRelPathsFromBlueprint(
+            result.addAll(loadOrderedRelPathsSetFromBlueprint(
                 "ojluni/src/main/native/Android.bp", "\\s+\"(.+\\.(?:c|cpp))\","));
             return result;
         }
 
-        private List<Path> loadRelPathsFromBlueprint(
+        private Set<Path> loadOrderedRelPathsSetFromBlueprint(
             String blueprintPathString, String patternString) throws IOException {
             Path blueprintPath = rootPath.resolve(blueprintPathString);
             Pattern pattern = Pattern.compile(patternString);
-            List<Path> result = new ArrayList<>();
+            // Use TreeSet to sort and de-duplicate the result.
+            Set<Path> result = new TreeSet<>();
             for (String line : Util.readLines(blueprintPath)) {
                 Matcher matcher = pattern.matcher(line);
                 while (matcher.find()) {
@@ -251,7 +254,6 @@
                     result.add(relPath);
                 }
             }
-            Collections.sort(result);
             return result;
         }
 
diff --git a/tools/upstream/src/main/java/libcore/StandardRepositories.java b/tools/upstream/src/main/java/libcore/StandardRepositories.java
index 3bdbebf..31efe94 100644
--- a/tools/upstream/src/main/java/libcore/StandardRepositories.java
+++ b/tools/upstream/src/main/java/libcore/StandardRepositories.java
@@ -76,19 +76,11 @@
     }
 
     public static StandardRepositories fromEnv() {
-        Path androidBuildTop = Paths.get(getEnvOrThrow("ANDROID_BUILD_TOP"));
-        Path upstreamRoot = Paths.get(getEnvOrThrow("OPENJDK_HOME"));
+        Path androidBuildTop = Util.pathFromEnvOrThrow("ANDROID_BUILD_TOP");
+        Path upstreamRoot = Util.pathFromEnvOrThrow("OPENJDK_HOME");
         return new StandardRepositories(androidBuildTop, upstreamRoot);
     }
 
-    private static String getEnvOrThrow(String name) {
-        String result = System.getenv(name);
-        if (result == null) {
-            throw new IllegalStateException("Environment variable undefined: " + name);
-        }
-        return result;
-    }
-
     private static final Set<String> juFilesFromJsr166 = Collections.unmodifiableSet(
             new HashSet<>(Arrays.asList(
                     "AbstractQueue",
diff --git a/tools/upstream/src/main/java/libcore/Util.java b/tools/upstream/src/main/java/libcore/Util.java
index c50e990..0f69c5f 100644
--- a/tools/upstream/src/main/java/libcore/Util.java
+++ b/tools/upstream/src/main/java/libcore/Util.java
@@ -26,6 +26,7 @@
 import java.io.Reader;
 import java.io.Writer;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -36,6 +37,23 @@
     private Util() {
     }
 
+    public static Path pathFromEnvOrThrow(String name) {
+        String envValue = getEnvOrThrow(name);
+        Path result = Paths.get(envValue);
+        if (!result.toFile().exists()) {
+            throw new IllegalArgumentException("Path not found: " + result);
+        }
+        return result;
+    }
+
+    private static String getEnvOrThrow(String name) {
+        String result = System.getenv(name);
+        if (result == null) {
+            throw new IllegalStateException("Environment variable undefined: " + name);
+        }
+        return result;
+    }
+
     public static Lines readLines(Reader reader) throws IOException {
         List<String> result = new ArrayList<>();
         BufferedReader br = (reader instanceof BufferedReader)