Merge "Add test with known failure on virtual devices to TEST_MAPPING."
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index f446439..8a5813b 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,33 @@
     },
 }
 
+// A separated core library that contains ICU4J because ICU4J will be in a different APEX module,
+// not in Runtime module.
+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"],
+    libs: ["libcore-unsupportedappusage-annotation"],
+    static_libs: ["android_icu4j_resources_lib_sdk_core_current"],
+
+    // We use core_current when compiling core-icu4j but we could depend on core.intra.stubs
+    // (a superset of core_current) instead if there were internal APIs we wanted to use from ICU4J.
+    // It is important that core-icu4j is restricted to only use APIs that core-libart and core-oj
+    // consider stable since they are in a different APEX module that can be updated independently.
+    sdk_version: "core_current",
+    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 +394,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 +429,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 +530,7 @@
     libs: [
         "core-oj",
         "core-libart",
+        "core-icu4j",
         "bouncycastle",
         "conscrypt",
         "okhttp",
@@ -822,6 +896,18 @@
     srcs: [":timezone_host_files"],
 }
 
+// A library that contains annotations not retented in runtime and inline-able constants
+// that should not introduce any runtime dependency for compiling core libraries, e.g. core-icu4j,
+java_library {
+    name: "libcore-unsupportedappusage-annotation",
+    srcs: [
+        ":unsupportedappusage_annotation_files",
+    ],
+
+    installable: false,
+    sdk_version: "core_current",
+}
+
 // The source files that contain the UnsupportedAppUsage annotation and its dependencies.
 filegroup {
     name: "unsupportedappusage_annotation_files",
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/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/main/java/libcore/util/FP16.java b/luni/src/main/java/libcore/util/FP16.java
new file mode 100644
index 0000000..88fe43a
--- /dev/null
+++ b/luni/src/main/java/libcore/util/FP16.java
@@ -0,0 +1,719 @@
+/*
+ * 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.util;
+
+/**
+ * <p>The {@code FP16} class is a wrapper and a utility class to manipulate half-precision 16-bit
+ * <a href="https://en.wikipedia.org/wiki/Half-precision_floating-point_format">IEEE 754</a>
+ * floating point data types (also called fp16 or binary16). A half-precision float can be
+ * created from or converted to single-precision floats, and is stored in a short data type.
+ *
+ * <p>The IEEE 754 standard specifies an fp16 as having the following format:</p>
+ * <ul>
+ * <li>Sign bit: 1 bit</li>
+ * <li>Exponent width: 5 bits</li>
+ * <li>Significand: 10 bits</li>
+ * </ul>
+ *
+ * <p>The format is laid out as follows:</p>
+ * <pre>
+ * 1   11111   1111111111
+ * ^   --^--   -----^----
+ * sign  |          |_______ significand
+ *       |
+ *       -- exponent
+ * </pre>
+ *
+ * <p>Half-precision floating points can be useful to save memory and/or
+ * bandwidth at the expense of range and precision when compared to single-precision
+ * floating points (fp32).</p>
+ * <p>To help you decide whether fp16 is the right storage type for you need, please
+ * refer to the table below that shows the available precision throughout the range of
+ * possible values. The <em>precision</em> column indicates the step size between two
+ * consecutive numbers in a specific part of the range.</p>
+ *
+ * <table summary="Precision of fp16 across the range">
+ *     <tr><th>Range start</th><th>Precision</th></tr>
+ *     <tr><td>0</td><td>1 &frasl; 16,777,216</td></tr>
+ *     <tr><td>1 &frasl; 16,384</td><td>1 &frasl; 16,777,216</td></tr>
+ *     <tr><td>1 &frasl; 8,192</td><td>1 &frasl; 8,388,608</td></tr>
+ *     <tr><td>1 &frasl; 4,096</td><td>1 &frasl; 4,194,304</td></tr>
+ *     <tr><td>1 &frasl; 2,048</td><td>1 &frasl; 2,097,152</td></tr>
+ *     <tr><td>1 &frasl; 1,024</td><td>1 &frasl; 1,048,576</td></tr>
+ *     <tr><td>1 &frasl; 512</td><td>1 &frasl; 524,288</td></tr>
+ *     <tr><td>1 &frasl; 256</td><td>1 &frasl; 262,144</td></tr>
+ *     <tr><td>1 &frasl; 128</td><td>1 &frasl; 131,072</td></tr>
+ *     <tr><td>1 &frasl; 64</td><td>1 &frasl; 65,536</td></tr>
+ *     <tr><td>1 &frasl; 32</td><td>1 &frasl; 32,768</td></tr>
+ *     <tr><td>1 &frasl; 16</td><td>1 &frasl; 16,384</td></tr>
+ *     <tr><td>1 &frasl; 8</td><td>1 &frasl; 8,192</td></tr>
+ *     <tr><td>1 &frasl; 4</td><td>1 &frasl; 4,096</td></tr>
+ *     <tr><td>1 &frasl; 2</td><td>1 &frasl; 2,048</td></tr>
+ *     <tr><td>1</td><td>1 &frasl; 1,024</td></tr>
+ *     <tr><td>2</td><td>1 &frasl; 512</td></tr>
+ *     <tr><td>4</td><td>1 &frasl; 256</td></tr>
+ *     <tr><td>8</td><td>1 &frasl; 128</td></tr>
+ *     <tr><td>16</td><td>1 &frasl; 64</td></tr>
+ *     <tr><td>32</td><td>1 &frasl; 32</td></tr>
+ *     <tr><td>64</td><td>1 &frasl; 16</td></tr>
+ *     <tr><td>128</td><td>1 &frasl; 8</td></tr>
+ *     <tr><td>256</td><td>1 &frasl; 4</td></tr>
+ *     <tr><td>512</td><td>1 &frasl; 2</td></tr>
+ *     <tr><td>1,024</td><td>1</td></tr>
+ *     <tr><td>2,048</td><td>2</td></tr>
+ *     <tr><td>4,096</td><td>4</td></tr>
+ *     <tr><td>8,192</td><td>8</td></tr>
+ *     <tr><td>16,384</td><td>16</td></tr>
+ *     <tr><td>32,768</td><td>32</td></tr>
+ * </table>
+ *
+ * <p>This table shows that numbers higher than 1024 lose all fractional precision.</p>
+ *
+ * @hide
+ */
+
+@libcore.api.CorePlatformApi
+public class FP16 {
+    /**
+     * The number of bits used to represent a half-precision float value.
+     */
+    @libcore.api.CorePlatformApi
+    public static final int SIZE = 16;
+
+    /**
+     * Epsilon is the difference between 1.0 and the next value representable
+     * by a half-precision floating-point.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short EPSILON = (short) 0x1400;
+
+    /**
+     * Maximum exponent a finite half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final int MAX_EXPONENT = 15;
+    /**
+     * Minimum exponent a normalized half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final int MIN_EXPONENT = -14;
+
+    /**
+     * Smallest negative value a half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short LOWEST_VALUE = (short) 0xfbff;
+    /**
+     * Maximum positive finite value a half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short MAX_VALUE = (short) 0x7bff;
+    /**
+     * Smallest positive normal value a half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short MIN_NORMAL = (short) 0x0400;
+    /**
+     * Smallest positive non-zero value a half-precision float may have.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short MIN_VALUE = (short) 0x0001;
+    /**
+     * A Not-a-Number representation of a half-precision float.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short NaN = (short) 0x7e00;
+    /**
+     * Negative infinity of type half-precision float.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short NEGATIVE_INFINITY = (short) 0xfc00;
+    /**
+     * Negative 0 of type half-precision float.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short NEGATIVE_ZERO = (short) 0x8000;
+    /**
+     * Positive infinity of type half-precision float.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short POSITIVE_INFINITY = (short) 0x7c00;
+    /**
+     * Positive 0 of type half-precision float.
+     */
+    @libcore.api.CorePlatformApi
+    public static final short POSITIVE_ZERO = (short) 0x0000;
+
+    @libcore.api.CorePlatformApi
+    public static final int SIGN_SHIFT                = 15;
+    @libcore.api.CorePlatformApi
+    public static final int EXPONENT_SHIFT            = 10;
+    @libcore.api.CorePlatformApi
+    public static final int SIGN_MASK                 = 0x8000;
+    @libcore.api.CorePlatformApi
+    public static final int SHIFTED_EXPONENT_MASK     = 0x1f;
+    @libcore.api.CorePlatformApi
+    public static final int SIGNIFICAND_MASK          = 0x3ff;
+    @libcore.api.CorePlatformApi
+    public static final int EXPONENT_SIGNIFICAND_MASK = 0x7fff;
+    @libcore.api.CorePlatformApi
+    public static final int EXPONENT_BIAS             = 15;
+
+    private static final int FP32_SIGN_SHIFT            = 31;
+    private static final int FP32_EXPONENT_SHIFT        = 23;
+    private static final int FP32_SHIFTED_EXPONENT_MASK = 0xff;
+    private static final int FP32_SIGNIFICAND_MASK      = 0x7fffff;
+    private static final int FP32_EXPONENT_BIAS         = 127;
+    private static final int FP32_QNAN_MASK             = 0x400000;
+    private static final int FP32_DENORMAL_MAGIC = 126 << 23;
+    private static final float FP32_DENORMAL_FLOAT = Float.intBitsToFloat(FP32_DENORMAL_MAGIC);
+
+    /** Hidden constructor to prevent instantiation. */
+    private FP16() {}
+
+    /**
+     * <p>Compares the two specified half-precision float values. The following
+     * conditions apply during the comparison:</p>
+     *
+     * <ul>
+     * <li>{@link #NaN} is considered by this method to be equal to itself and greater
+     * than all other half-precision float values (including {@code #POSITIVE_INFINITY})</li>
+     * <li>{@link #POSITIVE_ZERO} is considered by this method to be greater than
+     * {@link #NEGATIVE_ZERO}.</li>
+     * </ul>
+     *
+     * @param x The first half-precision float value to compare.
+     * @param y The second half-precision float value to compare
+     *
+     * @return  The value {@code 0} if {@code x} is numerically equal to {@code y}, a
+     *          value less than {@code 0} if {@code x} is numerically less than {@code y},
+     *          and a value greater than {@code 0} if {@code x} is numerically greater
+     *          than {@code y}
+     */
+    @libcore.api.CorePlatformApi
+    public static int compare(short x, short y) {
+        if (less(x, y)) return -1;
+        if (greater(x, y)) return 1;
+
+        // Collapse NaNs, akin to halfToIntBits(), but we want to keep
+        // (signed) short value types to preserve the ordering of -0.0
+        // and +0.0
+        short xBits = (x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY ? NaN : x;
+        short yBits = (y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY ? NaN : y;
+
+        return (xBits == yBits ? 0 : (xBits < yBits ? -1 : 1));
+    }
+
+    /**
+     * Returns the closest integral half-precision float value to the specified
+     * half-precision float value. Special values are handled in the
+     * following ways:
+     * <ul>
+     * <li>If the specified half-precision float is NaN, the result is NaN</li>
+     * <li>If the specified half-precision float is infinity (negative or positive),
+     * the result is infinity (with the same sign)</li>
+     * <li>If the specified half-precision float is zero (negative or positive),
+     * the result is zero (with the same sign)</li>
+     * </ul>
+     *
+     * @param h A half-precision float value
+     * @return The value of the specified half-precision float rounded to the nearest
+     *         half-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static short rint(short h) {
+        int bits = h & 0xffff;
+        int e = bits & EXPONENT_SIGNIFICAND_MASK;
+        int result = bits;
+
+        if (e < 0x3c00) {
+            result &= SIGN_MASK;
+            result |= (0x3c00 & (e >= 0x3800 ? 0xffff : 0x0));
+        } else if (e < 0x6400) {
+            e = 25 - (e >> 10);
+            int mask = (1 << e) - 1;
+            result += (1 << (e - 1));
+            result &= ~mask;
+        }
+
+        return (short) result;
+    }
+
+    /**
+     * Returns the smallest half-precision float value toward negative infinity
+     * greater than or equal to the specified half-precision float value.
+     * Special values are handled in the following ways:
+     * <ul>
+     * <li>If the specified half-precision float is NaN, the result is NaN</li>
+     * <li>If the specified half-precision float is infinity (negative or positive),
+     * the result is infinity (with the same sign)</li>
+     * <li>If the specified half-precision float is zero (negative or positive),
+     * the result is zero (with the same sign)</li>
+     * </ul>
+     *
+     * @param h A half-precision float value
+     * @return The smallest half-precision float value toward negative infinity
+     *         greater than or equal to the specified half-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static short ceil(short h) {
+        int bits = h & 0xffff;
+        int e = bits & EXPONENT_SIGNIFICAND_MASK;
+        int result = bits;
+
+        if (e < 0x3c00) {
+            result &= SIGN_MASK;
+            result |= 0x3c00 & -(~(bits >> 15) & (e != 0 ? 1 : 0));
+        } else if (e < 0x6400) {
+            e = 25 - (e >> 10);
+            int mask = (1 << e) - 1;
+            result += mask & ((bits >> 15) - 1);
+            result &= ~mask;
+        }
+
+        return (short) result;
+    }
+
+    /**
+     * Returns the largest half-precision float value toward positive infinity
+     * less than or equal to the specified half-precision float value.
+     * Special values are handled in the following ways:
+     * <ul>
+     * <li>If the specified half-precision float is NaN, the result is NaN</li>
+     * <li>If the specified half-precision float is infinity (negative or positive),
+     * the result is infinity (with the same sign)</li>
+     * <li>If the specified half-precision float is zero (negative or positive),
+     * the result is zero (with the same sign)</li>
+     * </ul>
+     *
+     * @param h A half-precision float value
+     * @return The largest half-precision float value toward positive infinity
+     *         less than or equal to the specified half-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static short floor(short h) {
+        int bits = h & 0xffff;
+        int e = bits & EXPONENT_SIGNIFICAND_MASK;
+        int result = bits;
+
+        if (e < 0x3c00) {
+            result &= SIGN_MASK;
+            result |= 0x3c00 & (bits > 0x8000 ? 0xffff : 0x0);
+        } else if (e < 0x6400) {
+            e = 25 - (e >> 10);
+            int mask = (1 << e) - 1;
+            result += mask & -(bits >> 15);
+            result &= ~mask;
+        }
+
+        return (short) result;
+    }
+
+    /**
+     * Returns the truncated half-precision float value of the specified
+     * half-precision float value. Special values are handled in the following ways:
+     * <ul>
+     * <li>If the specified half-precision float is NaN, the result is NaN</li>
+     * <li>If the specified half-precision float is infinity (negative or positive),
+     * the result is infinity (with the same sign)</li>
+     * <li>If the specified half-precision float is zero (negative or positive),
+     * the result is zero (with the same sign)</li>
+     * </ul>
+     *
+     * @param h A half-precision float value
+     * @return The truncated half-precision float value of the specified
+     *         half-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static short trunc(short h) {
+        int bits = h & 0xffff;
+        int e = bits & EXPONENT_SIGNIFICAND_MASK;
+        int result = bits;
+
+        if (e < 0x3c00) {
+            result &= SIGN_MASK;
+        } else if (e < 0x6400) {
+            e = 25 - (e >> 10);
+            int mask = (1 << e) - 1;
+            result &= ~mask;
+        }
+
+        return (short) result;
+    }
+
+    /**
+     * Returns the smaller of two half-precision float values (the value closest
+     * to negative infinity). Special values are handled in the following ways:
+     * <ul>
+     * <li>If either value is NaN, the result is NaN</li>
+     * <li>{@link #NEGATIVE_ZERO} is smaller than {@link #POSITIVE_ZERO}</li>
+     * </ul>
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     * @return The smaller of the two specified half-precision values
+     */
+    @libcore.api.CorePlatformApi
+    public static short min(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return NaN;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return NaN;
+
+        if ((x & EXPONENT_SIGNIFICAND_MASK) == 0 && (y & EXPONENT_SIGNIFICAND_MASK) == 0) {
+            return (x & SIGN_MASK) != 0 ? x : y;
+        }
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) <
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff) ? x : y;
+    }
+
+    /**
+     * Returns the larger of two half-precision float values (the value closest
+     * to positive infinity). Special values are handled in the following ways:
+     * <ul>
+     * <li>If either value is NaN, the result is NaN</li>
+     * <li>{@link #POSITIVE_ZERO} is greater than {@link #NEGATIVE_ZERO}</li>
+     * </ul>
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return The larger of the two specified half-precision values
+     */
+    @libcore.api.CorePlatformApi
+    public static short max(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return NaN;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return NaN;
+
+        if ((x & EXPONENT_SIGNIFICAND_MASK) == 0 && (y & EXPONENT_SIGNIFICAND_MASK) == 0) {
+            return (x & SIGN_MASK) != 0 ? y : x;
+        }
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) >
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff) ? x : y;
+    }
+
+    /**
+     * Returns true if the first half-precision float value is less (smaller
+     * toward negative infinity) than the second half-precision float value.
+     * If either of the values is NaN, the result is false.
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return True if x is less than y, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean less(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) <
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff);
+    }
+
+    /**
+     * Returns true if the first half-precision float value is less (smaller
+     * toward negative infinity) than or equal to the second half-precision
+     * float value. If either of the values is NaN, the result is false.
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return True if x is less than or equal to y, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean lessEquals(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) <=
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff);
+    }
+
+    /**
+     * Returns true if the first half-precision float value is greater (larger
+     * toward positive infinity) than the second half-precision float value.
+     * If either of the values is NaN, the result is false.
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return True if x is greater than y, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean greater(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) >
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff);
+    }
+
+    /**
+     * Returns true if the first half-precision float value is greater (larger
+     * toward positive infinity) than or equal to the second half-precision float
+     * value. If either of the values is NaN, the result is false.
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return True if x is greater than y, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean greaterEquals(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+
+        return ((x & SIGN_MASK) != 0 ? 0x8000 - (x & 0xffff) : x & 0xffff) >=
+               ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff);
+    }
+
+    /**
+     * Returns true if the two half-precision float values are equal.
+     * If either of the values is NaN, the result is false. {@link #POSITIVE_ZERO}
+     * and {@link #NEGATIVE_ZERO} are considered equal.
+     *
+     * @param x The first half-precision value
+     * @param y The second half-precision value
+     *
+     * @return True if x is equal to y, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean equals(short x, short y) {
+        if ((x & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+        if ((y & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY) return false;
+
+        return x == y || ((x | y) & EXPONENT_SIGNIFICAND_MASK) == 0;
+    }
+
+    /**
+     * Returns true if the specified half-precision float value represents
+     * infinity, false otherwise.
+     *
+     * @param h A half-precision float value
+     * @return True if the value is positive infinity or negative infinity,
+     *         false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean isInfinite(short h) {
+        return (h & EXPONENT_SIGNIFICAND_MASK) == POSITIVE_INFINITY;
+    }
+
+    /**
+     * Returns true if the specified half-precision float value represents
+     * a Not-a-Number, false otherwise.
+     *
+     * @param h A half-precision float value
+     * @return True if the value is a NaN, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean isNaN(short h) {
+        return (h & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY;
+    }
+
+    /**
+     * Returns true if the specified half-precision float value is normalized
+     * (does not have a subnormal representation). If the specified value is
+     * {@link #POSITIVE_INFINITY}, {@link #NEGATIVE_INFINITY},
+     * {@link #POSITIVE_ZERO}, {@link #NEGATIVE_ZERO}, NaN or any subnormal
+     * number, this method returns false.
+     *
+     * @param h A half-precision float value
+     * @return True if the value is normalized, false otherwise
+     */
+    @libcore.api.CorePlatformApi
+    public static boolean isNormalized(short h) {
+        return (h & POSITIVE_INFINITY) != 0 && (h & POSITIVE_INFINITY) != POSITIVE_INFINITY;
+    }
+
+    /**
+     * <p>Converts the specified half-precision float value into a
+     * single-precision float value. The following special cases are handled:</p>
+     * <ul>
+     * <li>If the input is {@link #NaN}, the returned value is {@link Float#NaN}</li>
+     * <li>If the input is {@link #POSITIVE_INFINITY} or
+     * {@link #NEGATIVE_INFINITY}, the returned value is respectively
+     * {@link Float#POSITIVE_INFINITY} or {@link Float#NEGATIVE_INFINITY}</li>
+     * <li>If the input is 0 (positive or negative), the returned value is +/-0.0f</li>
+     * <li>Otherwise, the returned value is a normalized single-precision float value</li>
+     * </ul>
+     *
+     * @param h The half-precision float value to convert to single-precision
+     * @return A normalized single-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static float toFloat(short h) {
+        int bits = h & 0xffff;
+        int s = bits & SIGN_MASK;
+        int e = (bits >>> EXPONENT_SHIFT) & SHIFTED_EXPONENT_MASK;
+        int m = (bits                        ) & SIGNIFICAND_MASK;
+
+        int outE = 0;
+        int outM = 0;
+
+        if (e == 0) { // Denormal or 0
+            if (m != 0) {
+                // Convert denorm fp16 into normalized fp32
+                float o = Float.intBitsToFloat(FP32_DENORMAL_MAGIC + m);
+                o -= FP32_DENORMAL_FLOAT;
+                return s == 0 ? o : -o;
+            }
+        } else {
+            outM = m << 13;
+            if (e == 0x1f) { // Infinite or NaN
+                outE = 0xff;
+                if (outM != 0) { // SNaNs are quieted
+                    outM |= FP32_QNAN_MASK;
+                }
+            } else {
+                outE = e - EXPONENT_BIAS + FP32_EXPONENT_BIAS;
+            }
+        }
+
+        int out = (s << 16) | (outE << FP32_EXPONENT_SHIFT) | outM;
+        return Float.intBitsToFloat(out);
+    }
+
+    /**
+     * <p>Converts the specified single-precision float value into a
+     * half-precision float value. The following special cases are handled:</p>
+     * <ul>
+     * <li>If the input is NaN (see {@link Float#isNaN(float)}), the returned
+     * value is {@link #NaN}</li>
+     * <li>If the input is {@link Float#POSITIVE_INFINITY} or
+     * {@link Float#NEGATIVE_INFINITY}, the returned value is respectively
+     * {@link #POSITIVE_INFINITY} or {@link #NEGATIVE_INFINITY}</li>
+     * <li>If the input is 0 (positive or negative), the returned value is
+     * {@link #POSITIVE_ZERO} or {@link #NEGATIVE_ZERO}</li>
+     * <li>If the input is a less than {@link #MIN_VALUE}, the returned value
+     * is flushed to {@link #POSITIVE_ZERO} or {@link #NEGATIVE_ZERO}</li>
+     * <li>If the input is a less than {@link #MIN_NORMAL}, the returned value
+     * is a denorm half-precision float</li>
+     * <li>Otherwise, the returned value is rounded to the nearest
+     * representable half-precision float value</li>
+     * </ul>
+     *
+     * @param f The single-precision float value to convert to half-precision
+     * @return A half-precision float value
+     */
+    @libcore.api.CorePlatformApi
+    public static short toHalf(float f) {
+        int bits = Float.floatToRawIntBits(f);
+        int s = (bits >>> FP32_SIGN_SHIFT    );
+        int e = (bits >>> FP32_EXPONENT_SHIFT) & FP32_SHIFTED_EXPONENT_MASK;
+        int m = (bits                        ) & FP32_SIGNIFICAND_MASK;
+
+        int outE = 0;
+        int outM = 0;
+
+        if (e == 0xff) { // Infinite or NaN
+            outE = 0x1f;
+            outM = m != 0 ? 0x200 : 0;
+        } else {
+            e = e - FP32_EXPONENT_BIAS + EXPONENT_BIAS;
+            if (e >= 0x1f) { // Overflow
+                outE = 0x31;
+            } else if (e <= 0) { // Underflow
+                if (e < -10) {
+                    // The absolute fp32 value is less than MIN_VALUE, flush to +/-0
+                } else {
+                    // The fp32 value is a normalized float less than MIN_NORMAL,
+                    // we convert to a denorm fp16
+                    m = (m | 0x800000) >> (1 - e);
+                    if ((m & 0x1000) != 0) m += 0x2000;
+                    outM = m >> 13;
+                }
+            } else {
+                outE = e;
+                outM = m >> 13;
+                if ((m & 0x1000) != 0) {
+                    // Round to nearest "0.5" up
+                    int out = (outE << EXPONENT_SHIFT) | outM;
+                    out++;
+                    return (short) (out | (s << SIGN_SHIFT));
+                }
+            }
+        }
+
+        return (short) ((s << SIGN_SHIFT) | (outE << EXPONENT_SHIFT) | outM);
+    }
+
+    /**
+     * <p>Returns a hexadecimal string representation of the specified half-precision
+     * float value. If the value is a NaN, the result is <code>"NaN"</code>,
+     * otherwise the result follows this format:</p>
+     * <ul>
+     * <li>If the sign is positive, no sign character appears in the result</li>
+     * <li>If the sign is negative, the first character is <code>'-'</code></li>
+     * <li>If the value is inifinity, the string is <code>"Infinity"</code></li>
+     * <li>If the value is 0, the string is <code>"0x0.0p0"</code></li>
+     * <li>If the value has a normalized representation, the exponent and
+     * significand are represented in the string in two fields. The significand
+     * starts with <code>"0x1."</code> followed by its lowercase hexadecimal
+     * representation. Trailing zeroes are removed unless all digits are 0, then
+     * a single zero is used. The significand representation is followed by the
+     * exponent, represented by <code>"p"</code>, itself followed by a decimal
+     * string of the unbiased exponent</li>
+     * <li>If the value has a subnormal representation, the significand starts
+     * with <code>"0x0."</code> followed by its lowercase hexadecimal
+     * representation. Trailing zeroes are removed unless all digits are 0, then
+     * a single zero is used. The significand representation is followed by the
+     * exponent, represented by <code>"p-14"</code></li>
+     * </ul>
+     *
+     * @param h A half-precision float value
+     * @return A hexadecimal string representation of the specified value
+     */
+    @libcore.api.CorePlatformApi
+    public static String toHexString(short h) {
+        StringBuilder o = new StringBuilder();
+
+        int bits = h & 0xffff;
+        int s = (bits >>> SIGN_SHIFT    );
+        int e = (bits >>> EXPONENT_SHIFT) & SHIFTED_EXPONENT_MASK;
+        int m = (bits                   ) & SIGNIFICAND_MASK;
+
+        if (e == 0x1f) { // Infinite or NaN
+            if (m == 0) {
+                if (s != 0) o.append('-');
+                o.append("Infinity");
+            } else {
+                o.append("NaN");
+            }
+        } else {
+            if (s == 1) o.append('-');
+            if (e == 0) {
+                if (m == 0) {
+                    o.append("0x0.0p0");
+                } else {
+                    o.append("0x0.");
+                    String significand = Integer.toHexString(m);
+                    o.append(significand.replaceFirst("0{2,}$", ""));
+                    o.append("p-14");
+                }
+            } else {
+                o.append("0x1.");
+                String significand = Integer.toHexString(m);
+                o.append(significand.replaceFirst("0{2,}$", ""));
+                o.append('p');
+                o.append(Integer.toString(e - EXPONENT_BIAS));
+            }
+        }
+
+        return o.toString();
+    }
+}
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..1810c8a 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();
@@ -1325,6 +1326,47 @@
     field public static final String[] STRING;
   }
 
+  public class FP16 {
+    method public static short ceil(short);
+    method public static int compare(short, short);
+    method public static boolean equals(short, short);
+    method public static short floor(short);
+    method public static boolean greater(short, short);
+    method public static boolean greaterEquals(short, short);
+    method public static boolean isInfinite(short);
+    method public static boolean isNaN(short);
+    method public static boolean isNormalized(short);
+    method public static boolean less(short, short);
+    method public static boolean lessEquals(short, short);
+    method public static short max(short, short);
+    method public static short min(short, short);
+    method public static short rint(short);
+    method public static float toFloat(short);
+    method public static short toHalf(float);
+    method public static String toHexString(short);
+    method public static short trunc(short);
+    field public static final short EPSILON = 5120; // 0x1400
+    field public static final int EXPONENT_BIAS = 15; // 0xf
+    field public static final int EXPONENT_SHIFT = 10; // 0xa
+    field public static final int EXPONENT_SIGNIFICAND_MASK = 32767; // 0x7fff
+    field public static final short LOWEST_VALUE = -1025; // 0xfffffbff
+    field public static final int MAX_EXPONENT = 15; // 0xf
+    field public static final short MAX_VALUE = 31743; // 0x7bff
+    field public static final int MIN_EXPONENT = -14; // 0xfffffff2
+    field public static final short MIN_NORMAL = 1024; // 0x400
+    field public static final short MIN_VALUE = 1; // 0x1
+    field public static final short NEGATIVE_INFINITY = -1024; // 0xfffffc00
+    field public static final short NEGATIVE_ZERO = -32768; // 0xffff8000
+    field public static final short NaN = 32256; // 0x7e00
+    field public static final short POSITIVE_INFINITY = 31744; // 0x7c00
+    field public static final short POSITIVE_ZERO = 0; // 0x0
+    field public static final int SHIFTED_EXPONENT_MASK = 31; // 0x1f
+    field public static final int SIGNIFICAND_MASK = 1023; // 0x3ff
+    field public static final int SIGN_MASK = 32768; // 0x8000
+    field public static final int SIGN_SHIFT = 15; // 0xf
+    field public static final int SIZE = 16; // 0x10
+  }
+
   public class HexEncoding {
     method public static byte[] decode(String) throws java.lang.IllegalArgumentException;
     method public static byte[] decode(String, boolean) throws java.lang.IllegalArgumentException;
diff --git a/mmodules/intracoreapi/Android.bp b/mmodules/intracoreapi/Android.bp
index fab9d83..03a11a3 100644
--- a/mmodules/intracoreapi/Android.bp
+++ b/mmodules/intracoreapi/Android.bp
@@ -51,6 +51,7 @@
     name: "core.intra.stubs",
     visibility: [
         "//external/conscrypt",
+        "//libcore",
     ],
     srcs: [":core-intra-stubs"],
 
@@ -67,14 +68,15 @@
     name: "core-intra-stubs-system-modules",
     visibility: [
         "//external/conscrypt",
+        "//libcore",
     ],
     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-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 and icu4j
+// we haven't added to the intra-core API.
 java_library {
     name: "core-libart-oj.depscheck",
     srcs: [
diff --git a/mmodules/intracoreapi/api/intra/current-api.txt b/mmodules/intracoreapi/api/intra/current-api.txt
index 7403138..390b72f 100644
--- a/mmodules/intracoreapi/api/intra/current-api.txt
+++ b/mmodules/intracoreapi/api/intra/current-api.txt
@@ -22,14 +22,171 @@
 
 }
 
+package android.icu.impl {
+
+  @libcore.api.IntraCoreApi public abstract class CacheValue<V> {
+    method @libcore.api.IntraCoreApi public static void setStrength(android.icu.impl.CacheValue.Strength);
+  }
+
+  @libcore.api.IntraCoreApi public enum CacheValue.Strength {
+    enum_constant @libcore.api.IntraCoreApi public static final android.icu.impl.CacheValue.Strength SOFT;
+    enum_constant @libcore.api.IntraCoreApi public static final android.icu.impl.CacheValue.Strength STRONG;
+  }
+
+  @libcore.api.IntraCoreApi public final class ICUData {
+    field @libcore.api.IntraCoreApi public static final String ICU_BASE_NAME = "android/icu/impl/data/icudt64b";
+  }
+
+  @libcore.api.IntraCoreApi public class ICUResourceBundle extends android.icu.util.UResourceBundle {
+    method @libcore.api.IntraCoreApi public String getStringWithFallback(String) throws java.util.MissingResourceException;
+    method @dalvik.annotation.compat.UnsupportedAppUsage @libcore.api.IntraCoreApi public android.icu.impl.ICUResourceBundle getWithFallback(String) throws java.util.MissingResourceException;
+  }
+
+  @libcore.api.IntraCoreApi public class JavaTimeZone extends android.icu.util.TimeZone {
+    ctor @libcore.api.IntraCoreApi public JavaTimeZone(java.util.TimeZone, String);
+  }
+
+  @libcore.api.IntraCoreApi public final class ZoneMeta {
+    method @libcore.api.IntraCoreApi public static String getCanonicalCLDRID(String);
+  }
+
+}
+
+package android.icu.impl.number {
+
+  @libcore.api.IntraCoreApi public class DecimalFormatProperties implements java.lang.Cloneable java.io.Serializable {
+  }
+
+  @libcore.api.IntraCoreApi public enum DecimalFormatProperties.ParseMode {
+    enum_constant @libcore.api.IntraCoreApi public static final android.icu.impl.number.DecimalFormatProperties.ParseMode COMPATIBILITY;
+  }
+
+}
+
+package android.icu.text {
+
+  public class DateFormatSymbols implements java.lang.Cloneable java.io.Serializable {
+    ctor @Deprecated @libcore.api.IntraCoreApi public DateFormatSymbols(android.icu.util.ULocale, String);
+    method @libcore.api.IntraCoreApi public String[] getNarrowEras();
+  }
+
+  public class DateTimePatternGenerator implements java.lang.Cloneable android.icu.util.Freezable<android.icu.text.DateTimePatternGenerator> {
+    method @Deprecated @libcore.api.IntraCoreApi public static android.icu.text.DateTimePatternGenerator getFrozenInstance(android.icu.util.ULocale);
+  }
+
+  public class DecimalFormat extends android.icu.text.NumberFormat {
+    method @libcore.api.IntraCoreApi public void setParseStrictMode(android.icu.impl.number.DecimalFormatProperties.ParseMode);
+  }
+
+  public abstract class IDNA {
+    method @Deprecated @libcore.api.IntraCoreApi public static StringBuffer convertIDNToASCII(String, int) throws android.icu.text.StringPrepParseException;
+    method @Deprecated @libcore.api.IntraCoreApi public static StringBuffer convertIDNToUnicode(String, int) throws android.icu.text.StringPrepParseException;
+  }
+
+  public final class Normalizer implements java.lang.Cloneable {
+    method @Deprecated @libcore.api.IntraCoreApi public static boolean isNormalized(String, android.icu.text.Normalizer.Mode, int);
+    method @Deprecated @libcore.api.IntraCoreApi public static String normalize(String, android.icu.text.Normalizer.Mode);
+    field @Deprecated @libcore.api.IntraCoreApi public static final android.icu.text.Normalizer.Mode NFC;
+    field @Deprecated @libcore.api.IntraCoreApi public static final android.icu.text.Normalizer.Mode NFD;
+    field @Deprecated @libcore.api.IntraCoreApi public static final android.icu.text.Normalizer.Mode NFKC;
+    field @Deprecated @libcore.api.IntraCoreApi public static final android.icu.text.Normalizer.Mode NFKD;
+  }
+
+  @Deprecated @libcore.api.IntraCoreApi public abstract static class Normalizer.Mode {
+  }
+
+  public abstract class TimeZoneNames implements java.io.Serializable {
+    method @libcore.api.IntraCoreApi public java.util.Collection<android.icu.text.TimeZoneNames.MatchInfo> find(CharSequence, int, java.util.EnumSet<android.icu.text.TimeZoneNames.NameType>);
+    method @Deprecated @libcore.api.IntraCoreApi public void getDisplayNames(String, android.icu.text.TimeZoneNames.NameType[], long, String[], int);
+  }
+
+  @libcore.api.IntraCoreApi public static class TimeZoneNames.MatchInfo {
+    method @libcore.api.IntraCoreApi public int matchLength();
+    method @libcore.api.IntraCoreApi public String mzID();
+    method @libcore.api.IntraCoreApi public android.icu.text.TimeZoneNames.NameType nameType();
+    method @libcore.api.IntraCoreApi public String tzID();
+  }
+
+}
+
+package android.icu.util {
+
+  @libcore.api.IntraCoreApi public class AnnualTimeZoneRule extends android.icu.util.TimeZoneRule {
+    method @libcore.api.IntraCoreApi public int getEndYear();
+    method @libcore.api.IntraCoreApi public android.icu.util.DateTimeRule getRule();
+    field @libcore.api.IntraCoreApi public static final int MAX_YEAR = 2147483647; // 0x7fffffff
+  }
+
+  @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public abstract class BasicTimeZone extends android.icu.util.TimeZone {
+    method @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public abstract android.icu.util.TimeZoneTransition getNextTransition(long, boolean);
+    method @libcore.api.IntraCoreApi public abstract android.icu.util.TimeZoneRule[] getTimeZoneRules();
+  }
+
+  public abstract class Calendar implements java.lang.Cloneable java.lang.Comparable<android.icu.util.Calendar> java.io.Serializable {
+    method @libcore.api.IntraCoreApi public static String getDateTimeFormatString(android.icu.util.ULocale, String, int, int);
+  }
+
+  @libcore.api.IntraCoreApi public class DateTimeRule implements java.io.Serializable {
+    method @libcore.api.IntraCoreApi public int getDateRuleType();
+    method @libcore.api.IntraCoreApi public int getRuleDayOfMonth();
+    method @libcore.api.IntraCoreApi public int getRuleDayOfWeek();
+    method @libcore.api.IntraCoreApi public int getRuleMillisInDay();
+    method @libcore.api.IntraCoreApi public int getRuleMonth();
+    method @libcore.api.IntraCoreApi public int getTimeRuleType();
+    field @libcore.api.IntraCoreApi public static final int DOM = 0; // 0x0
+    field @libcore.api.IntraCoreApi public static final int DOW = 1; // 0x1
+    field @libcore.api.IntraCoreApi public static final int DOW_GEQ_DOM = 2; // 0x2
+    field @libcore.api.IntraCoreApi public static final int DOW_LEQ_DOM = 3; // 0x3
+    field @libcore.api.IntraCoreApi public static final int STANDARD_TIME = 1; // 0x1
+    field @libcore.api.IntraCoreApi public static final int UTC_TIME = 2; // 0x2
+    field @libcore.api.IntraCoreApi public static final int WALL_TIME = 0; // 0x0
+  }
+
+  @libcore.api.IntraCoreApi public class InitialTimeZoneRule extends android.icu.util.TimeZoneRule {
+  }
+
+  public abstract class TimeZone implements java.lang.Cloneable android.icu.util.Freezable<android.icu.util.TimeZone> java.io.Serializable {
+    method @Deprecated @libcore.api.IntraCoreApi public static void setICUDefault(android.icu.util.TimeZone);
+  }
+
+  @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public abstract class TimeZoneRule implements java.io.Serializable {
+    method @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public int getDSTSavings();
+    method @libcore.api.IntraCoreApi public int getRawOffset();
+  }
+
+  @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public class TimeZoneTransition {
+    method @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public android.icu.util.TimeZoneRule getFrom();
+    method @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public long getTime();
+    method @libcore.api.IntraCoreApi @libcore.api.CorePlatformApi public android.icu.util.TimeZoneRule getTo();
+  }
+
+  public final class ULocale implements java.lang.Comparable<android.icu.util.ULocale> java.io.Serializable {
+    method @Deprecated @libcore.api.IntraCoreApi public static String getRegionForSupplementalData(android.icu.util.ULocale, boolean);
+  }
+
+  @libcore.api.IntraCoreApi public abstract class UResourceBundle extends java.util.ResourceBundle {
+    ctor @libcore.api.IntraCoreApi public UResourceBundle();
+    method @libcore.api.IntraCoreApi public static android.icu.util.UResourceBundle getBundleInstance(String, java.util.Locale);
+    method @libcore.api.IntraCoreApi public String[] getStringArray();
+  }
+
+}
+
 package com.android.org.conscrypt {
 
   @libcore.api.IntraCoreApi public class DESEDESecretKeyFactory extends javax.crypto.SecretKeyFactorySpi {
     ctor @libcore.api.IntraCoreApi public DESEDESecretKeyFactory();
   }
 
-  @libcore.api.IntraCoreApi public final class DefaultSSLContextImpl extends com.android.org.conscrypt.OpenSSLContextImpl {
-    ctor @libcore.api.IntraCoreApi public DefaultSSLContextImpl() throws java.security.GeneralSecurityException, java.io.IOException;
+  @libcore.api.IntraCoreApi public class DefaultSSLContextImpl extends com.android.org.conscrypt.OpenSSLContextImpl {
+  }
+
+  @libcore.api.IntraCoreApi public static final class DefaultSSLContextImpl.TLSv12 extends com.android.org.conscrypt.DefaultSSLContextImpl {
+    ctor @libcore.api.IntraCoreApi public DefaultSSLContextImpl.TLSv12() throws java.security.GeneralSecurityException, java.io.IOException;
+  }
+
+  @libcore.api.IntraCoreApi public static final class DefaultSSLContextImpl.TLSv13 extends com.android.org.conscrypt.DefaultSSLContextImpl {
+    ctor @libcore.api.IntraCoreApi public DefaultSSLContextImpl.TLSv13() throws java.security.GeneralSecurityException, java.io.IOException;
   }
 
   @libcore.api.IntraCoreApi public class ECParameters extends java.security.AlgorithmParametersSpi {
@@ -103,135 +260,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 +366,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/non_openjdk_java_files.bp b/non_openjdk_java_files.bp
index 2cbb946..77c56e4 100644
--- a/non_openjdk_java_files.bp
+++ b/non_openjdk_java_files.bp
@@ -194,6 +194,7 @@
         "luni/src/main/java/libcore/util/CoreLibraryDebug.java",
         "luni/src/main/java/libcore/util/DebugInfo.java",
         "luni/src/main/java/libcore/util/EmptyArray.java",
+        "luni/src/main/java/libcore/util/FP16.java",
         "luni/src/main/java/libcore/util/HexEncoding.java",
         "luni/src/main/java/libcore/util/NativeAllocationRegistry.java",
         "luni/src/main/java/libcore/util/NonNull.java",
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/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)