Merge changes I0f3ea18f,I7204e8ab

* changes:
  Update sun.net to OpenJDK8u121-b13.
  Add missing / improve existing change markers in sun.net.
diff --git a/expectations/brokentests.txt b/expectations/brokentests.txt
deleted file mode 100644
index cd24094..0000000
--- a/expectations/brokentests.txt
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * This file contains expectations for tests that we'd like to eventually fix, but aren't urgent.
- */
-[
-{
-  description: "libcore.java.io.OldFileTest#test_deleteOnExit fails on IRM05 mysid-user",
-  name: "libcore.java.io.OldFileTest#test_deleteOnExit",
-  bug: 5834665
-},
-{
-  description: "We're retiring the security manager. Unfortunately, tests all over the place
-                need to check that they're secure, so they all fail when we refuse to install
-                a security manager. This suppresses all of these failures.",
-  result: EXEC_FAILED,
-  failure: "disable securityManager",
-  pattern: ".*java.lang.SecurityException\\s+at java.lang.System.setSecurityManager.*",
-  bug: 2585285
-},
-{
-  description: "ignore compilation errors due to different available APIs",
-  result: COMPILE_FAILED,
-  failure: "ignore compilation errors",
-  pattern: ".*\\.java:\\d+: cannot find symbol.*"
-},
-{
-  description: "the average length of possible UTF-8 sequences is 2 bytes.",
-  result: EXEC_FAILED,
-  name: "org.apache.harmony.tests.java.nio.charset.UTFCharsetEncoderTest#testSpecificDefaultValue",
-  substring: "junit.framework.AssertionFailedError: expected:<1.1> but was:<2.0>"
-},
-{
-  description: "Some tests (ExcludedProxyTest) connect to a public webserver to check that the HTTP client works",
-  result: EXEC_FAILED,
-  failure: "connect to the Internet",
-  pattern: ".*java.net.UnknownHostException:.*jcltest.apache.org.*"
-},
-{
-  description: "Some tests (ExcludedProxyTest) connect to a public webserver to check that the HTTP client works",
-  result: EXEC_FAILED,
-  names: [
-    "com.android.org.apache.harmony.luni.tests.java.net.ExcludedProxyTest"
-  ]
-},
-{
-  description: "Some tests depend on ICU data, which has changed. Others make assumptions about floating point rounding",
-  result: EXEC_FAILED,
-  names: [
-    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion",
-    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversionOther",
-    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_LineSeparator",
-    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_Percent"
-  ]
-},
-{
-  description: "(Needs investigation) Some tests make assertions that don't make sense, others use broken port allocation logic.",
-  result: EXEC_FAILED,
-  names: [
-    "org.apache.harmony.tests.java.net.InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII_loopbackInterface"
-  ]
-},
-{
-  description: "Potentially flakey because they rely on a specific local TCP port being free.",
-  result: EXEC_FAILED,
-  names: [
-      "org.apache.harmony.tests.java.nio.channels.ServerSocketChannelTest#test_bind_explicitPort"
-  ]
-},
-{
-  description: "The ResourceBundle code under test is probably not used much on Android and needs a lot of attention.",
-  modes: [device],
-  bug: 13747957,
-  names: [
-      "org.apache.harmony.tests.java.util.ControlTest#test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ"
-  ]
-},
-{
-  description: "Fails in CTS, passes in CoreTestRunner.",
-  result: EXEC_FAILED,
-  modes: [device],
-  names: [
-      "org.apache.harmony.tests.java.net.URLConnection#test_getContentEncoding",
-      "libcore.java.text.OldNumberFormatTest#test_parseLjava_lang_String",
-      "libcore.java.nio.channels.OldSocketChannelTest#test_writeLjava_nio_ByteBuffer_Nonblocking_HugeData",
-      "org.apache.harmony.tests.java.lang.ProcessManagerTest#testSleep",
-      "libcore.java.security.cert.OldPKIXParametersTest#testPKIXParametersKeyStore04"
-  ]
-},
-{
-  description: "Suffers from DH slowness, disabling for now.",
-  result: EXEC_FAILED,
-  names: [
-      "libcore.java.security.OldDHTest#testDHGen",
-      "libcore.java.security.OldKeyPairGeneratorTestDH#testKeyPairGenerator",
-      "libcore.javax.crypto.spec.KeyPairGeneratorTestDH#testKeyPairGenerator",
-      "libcore.javax.crypto.spec.AlgorithmParametersTestDH#testAlgorithmParameters",
-      "libcore.javax.crypto.spec.AlgorithmParameterGeneratorTestDH#testAlgorithmParameterGenerator"
-  ]
-},
-{
-  description: "Destroys MD5 provider, hurts succeeding tests",
-  result: EXEC_FAILED,
-  names: [
-      "org.apache.harmony.tests.api.javax.security.cert.X509CertificateTest#testVerifyPublicKey",
-      "org.apache.harmony.tests.api.javax.security.cert.X509CertificateTest#testVerifyPublicKeyString"
-  ]
-},
-{
-  description: "Support_TestWebServer requires isolation.",
-  result: EXEC_FAILED,
-  names: [
-      "libcore.java.net.OldURLClassLoaderTest#test_findResourceLjava_lang_String"
-  ]
-},
-{
-  description: "Causes OutOfMemoryError to test finalization",
-  result: EXEC_FAILED,
-  names: [
-      "org.apache.harmony.tests.java.lang.ref.SoftReferenceTest#test_get_SoftReference",
-      "org.apache.harmony.crypto.tests.javax.crypto#ExemptionMechanismTest#test_finalize"
-  ]
-},
-{
-  description: "Causes open dex file error",
-  modes: [device],
-  names: [
-      "org.apache.harmony.tests.java.lang.reflect.GenericSignatureFormatErrorTest#test_signatureFormatError"
-  ]
-},
-{
-  description: "Requires functional Support_Jetty",
-  bug: 28535961,
-  result: EXEC_FAILED,
-  names: [
-      "com.android.org.apache.harmony.luni.tests.java.net.URLClassLoaderTest"
-  ]
-},
-{
-  description: "Unable to execute Support_AvailTest",
-  result: EXEC_FAILED,
-  bug: 28535603,
-  names: [
-      "com.android.org.apache.harmony.luni.tests.internal.process.SystemProcessTest#test_interrupt"
-  ]
-}
-]
diff --git a/expectations/icebox.txt b/expectations/icebox.txt
deleted file mode 100644
index db9e3ad..0000000
--- a/expectations/icebox.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * This file contains expectations for tests that we'd like to eventually fix, but aren't urgent.
- */
-[
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DomTest#testEntityDeclarations",
-  substring: "This implementation does not parse entity declarations"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DomTest#testGetWholeTextWithEntityReference",
-  substring: "This implementation doesn't resolve entity references in getWholeText"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  name: "libcore.xml.DomTest#testExpandingEntityReferencesOff",
-  bug: 3268630,
-  substring: "This implementation doesn't include children in entity references"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  name: "libcore.xml.DomTest#testExpandingEntityReferencesOn",
-  bug: 3268630,
-  substring: "This implementation doesn't expand entity references"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DomTest#testIsElementContentWhitespaceWithDeclaration",
-  substring: "This implementation does not recognize element content whitespace"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DomTest#testNotations",
-  substring: "This implementation does not parse notations"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  names: [
-    "tests.org.w3c.dom.HCNotationsRemoveNamedItemNS#testRemoveNamedItemNS",
-    "tests.org.w3c.dom.HCNotationsSetNamedItemNS#testNotationsSetNamedItemNS"
-  ]
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DeclarationTest#testGetXmlEncoding",
-  substring: "This implementation doesn't parse the encoding from the XML declaration"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DeclarationTest#testGetXmlStandalone",
-  substring: "This implementation doesn't parse standalone from the XML declaration"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.DeclarationTest#testGetXmlVersion",
-  substring: "This implementation doesn't parse the version from the XML declaration"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "libcore.xml.NormalizeTest#testSchemaTypeDtd",
-  substring: "This implementation's setParameter() supports an unexpected value: schema-type=http://www.w3.org/TR/REC-xml"
-},
-{
-  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
-  bug: 3268630,
-  name: "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderTest#testSetEntityResolver",
-  substring: "java.lang.ClassCastException: org.apache.harmony.xml.dom.EntityReferenceImpl"
-},
-{
-  description: "many tests attempt to fork a Java executable, but fork the wrong one",
-  result: "EXEC_FAILED",
-  failure: "should fork a dalvikvm, not a JVM",
-  substring: "/system/bin.*IOException"
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "libcore.xml.DomTest#testAttributeNamedIdIsNotAnIdByDefault",
-  substring: "This implementation incorrectly interprets the \"id\" attribute as an identifier by default"
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "libcore.xml.DomTest#testDocumentAddChild",
-  substring: "Document nodes shouldn't accept child nodes"
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "libcore.xml.DomTest#testElementTraversalFeature",
-  substring: "This implementation is expected to support ElementTraversal v. 1.0 but does not."
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "libcore.xml.DomTest#testLoadSaveFeature",
-  substring: "This implementation is expected to support LS v. 3.0 but does not."
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "libcore.xml.SaxTest#testYesPrefixesYesNamespaces",
-  substring: "The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled."
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  name: "org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest#test_newInstance",
-  substring: "Expected FactoryConfigurationError was not thrown"
-},
-{
-  description: "low-impact XML bugs:",
-  result: EXEC_FAILED,
-  names: [
-    "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderFactoryTest#test_isSetXIncludeAware",
-    "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderTest#testIsXIncludeAware",
-    "org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest#test_setIsXIncludeAware",
-    "org.apache.harmony.tests.javax.xml.parsers.SAXParserTest#testIsXIncludeAware"
-  ],
-  substring: "java.lang.UnsupportedOperationException: This parser does not support specification \"Unknown\" version \"0.0\""
-},
-{
-  description: "a low-impact bug, also present in Crockford's implementation of org.json",
-  result: EXEC_FAILED,
-  name: "org.json.ParsingTest#test64BitHexValues",
-  substring: "Large hex longs shouldn't be yield ints or strings expected:<-1> but was:<0xFFFFFFFFFFFFFFFF>"
-},
-{
-  description: "this test needs to be fixed. We supply optional qnames, but this test doesn't expect them",
-  result: EXEC_FAILED,
-  name: "org.apache.harmony.tests.javax.xml.parsers.SAXParserTest#test_parseLjava_io_InputStreamLorg_xml_sax_helpers_DefaultHandlerLjava_lang_String"
-},
-{
-  description: "BouncyCastle allows unrecognized algorithms, but RI does not, not clear if this is a bug",
-  result: EXEC_FAILED,
-  name: "org.apache.harmony.crypto.tests.javax.crypto.KeyAgreementTest#test_generateSecretLjava_lang_String",
-  substring: "junit.framework.AssertionFailedError: NoSuchAlgorithmException expected"
-}
-]
diff --git a/expectations/knownfailures.txt b/expectations/knownfailures.txt
index 58a4337..2d60453 100644
--- a/expectations/knownfailures.txt
+++ b/expectations/knownfailures.txt
@@ -1,8 +1,49 @@
 /*
- * This file contains expectations for tests that were annotated with @KnownFailure at the time
+ * This file contains test expectations for libcore.
+ * TODO: Rename this file to account for the fact that it has both tags and known failures
  */
 [
 {
+  description: "large tests",
+  result: SUCCESS,
+  names: [
+    /* libcore tests that take over 15 minutes on device because of DHParametersHelper.generateSafePrimes */
+    "org.apache.harmony.crypto.tests.javax.crypto.func.KeyAgreementFunctionalTest",
+    "org.apache.harmony.crypto.tests.javax.crypto.interfaces.DHPrivateKeyTest",
+    "org.apache.harmony.crypto.tests.javax.crypto.interfaces.DHPublicKeyTest",
+    /* non-AOSP tests http://b/8027066 */
+    "java.util.EnumSet.EnumSetBash",
+    "java.io.PipedInputStream.CloseAndAvailableRC",
+    "java.io.PrintStream.OversynchronizedTest",
+    "java.io.PrintWriter.OversynchronizedTest",
+    "java.lang.String.Split",
+    "java.lang.ref.SoftReference.Pin",
+    "java.math.BigInteger.BigIntegerTest",
+    "java.net.MulticastSocket.Test",
+    "java.net.Socket.InheritTimeout",
+    "java.net.Socket.reset.Test",
+    "java.net.URLConnection.TimeoutTest",
+    "java.nio.channels.DatagramChannel.ConnectedSend",
+    "java.nio.channels.FileChannel.ExpandingMap",
+    "java.nio.channels.FileChannel.Transfers",
+    "java.nio.channels.SocketChannel.Open",
+    "java.text.Bidi.Bug6665028",
+    "java.util.Collections.FindSubList",
+    "java.util.Locale.Bug4518797",
+    "java.util.ResourceBundle.Control.StressTest",
+    "java.util.WeakHashMap.GCDuringIteration",
+    "java.util.concurrent.FutureTask.Throw",
+    "java.util.concurrent.locks.ReentrantReadWriteLock.MapLoops",
+    "java.util.zip.LargeZip",
+    "java.util.zip.ZipFile.LargeZipFile",
+    "java.util.zip.ZipFile.ManyEntries",
+    "libcore.java.lang.SystemTest_testArrayCopyConcurrentModification",
+    "sun.nio.cs.FindOneCharEncoderBugs",
+    "sun.nio.cs.SurrogateGB18030Test"
+  ],
+  "tags": [ "large" ]
+},
+{
   description: "can't compile a pattern with negative look-behind and quantifiers with upper bounds",
   result: EXEC_FAILED,
   name: "org.apache.harmony.regex.tests.java.util.regex.PatternTest#test_bug_40103",
@@ -1537,5 +1578,289 @@
   names: [
     "libcore.java.net.SocketTimeoutTest#testSocketWriteNeverTimeouts"
   ]
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DomTest#testEntityDeclarations",
+  substring: "This implementation does not parse entity declarations"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DomTest#testGetWholeTextWithEntityReference",
+  substring: "This implementation doesn't resolve entity references in getWholeText"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  name: "libcore.xml.DomTest#testExpandingEntityReferencesOff",
+  bug: 3268630,
+  substring: "This implementation doesn't include children in entity references"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  name: "libcore.xml.DomTest#testExpandingEntityReferencesOn",
+  bug: 3268630,
+  substring: "This implementation doesn't expand entity references"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DomTest#testIsElementContentWhitespaceWithDeclaration",
+  substring: "This implementation does not recognize element content whitespace"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DomTest#testNotations",
+  substring: "This implementation does not parse notations"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  names: [
+    "tests.org.w3c.dom.HCNotationsRemoveNamedItemNS#testRemoveNamedItemNS",
+    "tests.org.w3c.dom.HCNotationsSetNamedItemNS#testNotationsSetNamedItemNS"
+  ]
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DeclarationTest#testGetXmlEncoding",
+  substring: "This implementation doesn't parse the encoding from the XML declaration"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DeclarationTest#testGetXmlStandalone",
+  substring: "This implementation doesn't parse standalone from the XML declaration"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.DeclarationTest#testGetXmlVersion",
+  substring: "This implementation doesn't parse the version from the XML declaration"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "libcore.xml.NormalizeTest#testSchemaTypeDtd",
+  substring: "This implementation's setParameter() supports an unexpected value: schema-type=http://www.w3.org/TR/REC-xml"
+},
+{
+  description: "Dalvik doesn't support XML Schemas, DTDs or validation",
+  bug: 3268630,
+  name: "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderTest#testSetEntityResolver",
+  substring: "java.lang.ClassCastException: org.apache.harmony.xml.dom.EntityReferenceImpl"
+},
+{
+  description: "many tests attempt to fork a Java executable, but fork the wrong one",
+  result: "EXEC_FAILED",
+  failure: "should fork a dalvikvm, not a JVM",
+  substring: "/system/bin.*IOException"
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "libcore.xml.DomTest#testAttributeNamedIdIsNotAnIdByDefault",
+  substring: "This implementation incorrectly interprets the \"id\" attribute as an identifier by default"
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "libcore.xml.DomTest#testDocumentAddChild",
+  substring: "Document nodes shouldn't accept child nodes"
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "libcore.xml.DomTest#testElementTraversalFeature",
+  substring: "This implementation is expected to support ElementTraversal v. 1.0 but does not."
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "libcore.xml.DomTest#testLoadSaveFeature",
+  substring: "This implementation is expected to support LS v. 3.0 but does not."
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "libcore.xml.SaxTest#testYesPrefixesYesNamespaces",
+  substring: "The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled."
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  name: "org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest#test_newInstance",
+  substring: "Expected FactoryConfigurationError was not thrown"
+},
+{
+  description: "low-impact XML bugs:",
+  result: EXEC_FAILED,
+  names: [
+    "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderFactoryTest#test_isSetXIncludeAware",
+    "org.apache.harmony.tests.javax.xml.parsers.DocumentBuilderTest#testIsXIncludeAware",
+    "org.apache.harmony.tests.javax.xml.parsers.SAXParserFactoryTest#test_setIsXIncludeAware",
+    "org.apache.harmony.tests.javax.xml.parsers.SAXParserTest#testIsXIncludeAware"
+  ],
+  substring: "java.lang.UnsupportedOperationException: This parser does not support specification \"Unknown\" version \"0.0\""
+},
+{
+  description: "a low-impact bug, also present in Crockford's implementation of org.json",
+  result: EXEC_FAILED,
+  name: "org.json.ParsingTest#test64BitHexValues",
+  substring: "Large hex longs shouldn't be yield ints or strings expected:<-1> but was:<0xFFFFFFFFFFFFFFFF>"
+},
+{
+  description: "this test needs to be fixed. We supply optional qnames, but this test doesn't expect them",
+  result: EXEC_FAILED,
+  name: "org.apache.harmony.tests.javax.xml.parsers.SAXParserTest#test_parseLjava_io_InputStreamLorg_xml_sax_helpers_DefaultHandlerLjava_lang_String"
+},
+{
+  description: "BouncyCastle allows unrecognized algorithms, but RI does not, not clear if this is a bug",
+  result: EXEC_FAILED,
+  name: "org.apache.harmony.crypto.tests.javax.crypto.KeyAgreementTest#test_generateSecretLjava_lang_String",
+  substring: "junit.framework.AssertionFailedError: NoSuchAlgorithmException expected"
+},
+{
+  description: "libcore.java.io.OldFileTest#test_deleteOnExit fails on IRM05 mysid-user",
+  name: "libcore.java.io.OldFileTest#test_deleteOnExit",
+  bug: 5834665
+},
+{
+  description: "We're retiring the security manager. Unfortunately, tests all over the place
+                need to check that they're secure, so they all fail when we refuse to install
+                a security manager. This suppresses all of these failures.",
+  result: EXEC_FAILED,
+  failure: "disable securityManager",
+  pattern: ".*java.lang.SecurityException\\s+at java.lang.System.setSecurityManager.*",
+  bug: 2585285
+},
+{
+  description: "ignore compilation errors due to different available APIs",
+  result: COMPILE_FAILED,
+  failure: "ignore compilation errors",
+  pattern: ".*\\.java:\\d+: cannot find symbol.*"
+},
+{
+  description: "the average length of possible UTF-8 sequences is 2 bytes.",
+  result: EXEC_FAILED,
+  name: "org.apache.harmony.tests.java.nio.charset.UTFCharsetEncoderTest#testSpecificDefaultValue",
+  substring: "junit.framework.AssertionFailedError: expected:<1.1> but was:<2.0>"
+},
+{
+  description: "Some tests (ExcludedProxyTest) connect to a public webserver to check that the HTTP client works",
+  result: EXEC_FAILED,
+  failure: "connect to the Internet",
+  pattern: ".*java.net.UnknownHostException:.*jcltest.apache.org.*"
+},
+{
+  description: "Some tests (ExcludedProxyTest) connect to a public webserver to check that the HTTP client works",
+  result: EXEC_FAILED,
+  names: [
+    "com.android.org.apache.harmony.luni.tests.java.net.ExcludedProxyTest"
+  ]
+},
+{
+  description: "Some tests depend on ICU data, which has changed. Others make assumptions about floating point rounding",
+  result: EXEC_FAILED,
+  names: [
+    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion",
+    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversionOther",
+    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_LineSeparator",
+    "org.apache.harmony.tests.java.util.FormatterTest#test_formatLjava_lang_String$Ljava_lang_Object_Percent"
+  ]
+},
+{
+  description: "(Needs investigation) Some tests make assertions that don't make sense, others use broken port allocation logic.",
+  result: EXEC_FAILED,
+  names: [
+    "org.apache.harmony.tests.java.net.InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII_loopbackInterface"
+  ]
+},
+{
+  description: "Potentially flakey because they rely on a specific local TCP port being free.",
+  result: EXEC_FAILED,
+  names: [
+      "org.apache.harmony.tests.java.nio.channels.ServerSocketChannelTest#test_bind_explicitPort"
+  ]
+},
+{
+  description: "The ResourceBundle code under test is probably not used much on Android and needs a lot of attention.",
+  modes: [device],
+  bug: 13747957,
+  names: [
+      "org.apache.harmony.tests.java.util.ControlTest#test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ"
+  ]
+},
+{
+  description: "Fails in CTS, passes in CoreTestRunner.",
+  result: EXEC_FAILED,
+  modes: [device],
+  names: [
+      "org.apache.harmony.tests.java.net.URLConnection#test_getContentEncoding",
+      "libcore.java.text.OldNumberFormatTest#test_parseLjava_lang_String",
+      "libcore.java.nio.channels.OldSocketChannelTest#test_writeLjava_nio_ByteBuffer_Nonblocking_HugeData",
+      "org.apache.harmony.tests.java.lang.ProcessManagerTest#testSleep",
+      "libcore.java.security.cert.OldPKIXParametersTest#testPKIXParametersKeyStore04"
+  ]
+},
+{
+  description: "Suffers from DH slowness, disabling for now.",
+  result: EXEC_FAILED,
+  names: [
+      "libcore.java.security.OldDHTest#testDHGen",
+      "libcore.java.security.OldKeyPairGeneratorTestDH#testKeyPairGenerator",
+      "libcore.javax.crypto.spec.KeyPairGeneratorTestDH#testKeyPairGenerator",
+      "libcore.javax.crypto.spec.AlgorithmParametersTestDH#testAlgorithmParameters",
+      "libcore.javax.crypto.spec.AlgorithmParameterGeneratorTestDH#testAlgorithmParameterGenerator"
+  ]
+},
+{
+  description: "Destroys MD5 provider, hurts succeeding tests",
+  result: EXEC_FAILED,
+  names: [
+      "org.apache.harmony.tests.api.javax.security.cert.X509CertificateTest#testVerifyPublicKey",
+      "org.apache.harmony.tests.api.javax.security.cert.X509CertificateTest#testVerifyPublicKeyString"
+  ]
+},
+{
+  description: "Support_TestWebServer requires isolation.",
+  result: EXEC_FAILED,
+  names: [
+      "libcore.java.net.OldURLClassLoaderTest#test_findResourceLjava_lang_String"
+  ]
+},
+{
+  description: "Causes OutOfMemoryError to test finalization",
+  result: EXEC_FAILED,
+  names: [
+      "org.apache.harmony.tests.java.lang.ref.SoftReferenceTest#test_get_SoftReference",
+      "org.apache.harmony.crypto.tests.javax.crypto#ExemptionMechanismTest#test_finalize"
+  ]
+},
+{
+  description: "Causes open dex file error",
+  modes: [device],
+  names: [
+      "org.apache.harmony.tests.java.lang.reflect.GenericSignatureFormatErrorTest#test_signatureFormatError"
+  ]
+},
+{
+  description: "Requires functional Support_Jetty",
+  bug: 28535961,
+  result: EXEC_FAILED,
+  names: [
+      "com.android.org.apache.harmony.luni.tests.java.net.URLClassLoaderTest"
+  ]
+},
+{
+  description: "Unable to execute Support_AvailTest",
+  result: EXEC_FAILED,
+  bug: 28535603,
+  names: [
+      "com.android.org.apache.harmony.luni.tests.internal.process.SystemProcessTest#test_interrupt"
+  ]
 }
 ]
diff --git a/expectations/taggedtests.txt b/expectations/taggedtests.txt
deleted file mode 100644
index cc2a4d6..0000000
--- a/expectations/taggedtests.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file contains expectations for tests that require support from the test runner to complete
- * successfully.
- */
-[
-{
-  description: "large tests",
-  result: SUCCESS,
-  names: [
-    /* libcore tests that take over 15 minutes on device because of DHParametersHelper.generateSafePrimes */
-    "org.apache.harmony.crypto.tests.javax.crypto.func.KeyAgreementFunctionalTest",
-    "org.apache.harmony.crypto.tests.javax.crypto.interfaces.DHPrivateKeyTest",
-    "org.apache.harmony.crypto.tests.javax.crypto.interfaces.DHPublicKeyTest",
-    /* non-AOSP tests http://b/8027066 */
-    "java.util.EnumSet.EnumSetBash",
-    "java.io.PipedInputStream.CloseAndAvailableRC",
-    "java.io.PrintStream.OversynchronizedTest",
-    "java.io.PrintWriter.OversynchronizedTest",
-    "java.lang.String.Split",
-    "java.lang.ref.SoftReference.Pin",
-    "java.math.BigInteger.BigIntegerTest",
-    "java.net.MulticastSocket.Test",
-    "java.net.Socket.InheritTimeout",
-    "java.net.Socket.reset.Test",
-    "java.net.URLConnection.TimeoutTest",
-    "java.nio.channels.DatagramChannel.ConnectedSend",
-    "java.nio.channels.FileChannel.ExpandingMap",
-    "java.nio.channels.FileChannel.Transfers",
-    "java.nio.channels.SocketChannel.Open",
-    "java.text.Bidi.Bug6665028",
-    "java.util.Collections.FindSubList",
-    "java.util.Locale.Bug4518797",
-    "java.util.ResourceBundle.Control.StressTest",
-    "java.util.WeakHashMap.GCDuringIteration",
-    "java.util.concurrent.FutureTask.Throw",
-    "java.util.concurrent.locks.ReentrantReadWriteLock.MapLoops",
-    "java.util.zip.LargeZip",
-    "java.util.zip.ZipFile.LargeZipFile",
-    "java.util.zip.ZipFile.ManyEntries",
-    "libcore.java.lang.SystemTest_testArrayCopyConcurrentModification",
-    "sun.nio.cs.FindOneCharEncoderBugs",
-    "sun.nio.cs.SurrogateGB18030Test"
-  ],
-  "tags": [ "large" ]
-}
-]
diff --git a/ojluni/src/main/java/java/io/FilePermission.java b/ojluni/src/main/java/java/io/FilePermission.java
index 814a695..f9544c7 100644
--- a/ojluni/src/main/java/java/io/FilePermission.java
+++ b/ojluni/src/main/java/java/io/FilePermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/io/RandomAccessFile.java b/ojluni/src/main/java/java/io/RandomAccessFile.java
index 34eb7ab..f4830c1 100755
--- a/ojluni/src/main/java/java/io/RandomAccessFile.java
+++ b/ojluni/src/main/java/java/io/RandomAccessFile.java
@@ -65,10 +65,12 @@
 
 public class RandomAccessFile implements DataOutput, DataInput, Closeable {
 
+    // BEGIN Android-added: CloseGuard and some helper fields for Android changes in this file.
     private final CloseGuard guard = CloseGuard.get();
     private final byte[] scratch = new byte[8];
     private boolean syncMetadata = false;
     private int mode;
+    // END Android-added: CloseGuard and some helper fields for Android changes in this file.
 
     private FileDescriptor fd;
     private FileChannel channel = null;
@@ -82,11 +84,14 @@
 
     private Object closeLock = new Object();
     private volatile boolean closed = false;
+
+    // BEGIN Android-added: IoTracker.
     /**
      * A single tracker to track both read and write. The tracker resets when the operation
      * performed is different from the operation last performed.
      */
     private final IoTracker ioTracker = new IoTracker();
+    // END Android-added: IoTracker.
 
     /**
      * Creates a random access file stream to read from, and optionally
@@ -216,43 +221,57 @@
         throws FileNotFoundException
     {
         String name = (file != null ? file.getPath() : null);
-        this.mode = -1;
+        int imode = -1;
         if (mode.equals("r")) {
-            this.mode = O_RDONLY;
+            imode = O_RDONLY;
         } else if (mode.startsWith("rw")) {
             // Android-changed: Added. O_CREAT
-            this.mode = O_RDWR | O_CREAT;
+            // imode = O_RDWR;
+            imode = O_RDWR | O_CREAT;
             rw = true;
             if (mode.length() > 2) {
                 if (mode.equals("rws")) {
+                    // Android-changed: Don't use O_SYNC for "rws". Is this correct?
+                    // imode |= O_SYNC;
                     syncMetadata = true;
                 } else if (mode.equals("rwd")) {
-                    // Android-changed: Should this be O_DSYNC and the above O_SYNC ?
-                    this.mode |= O_SYNC;
+                    // Android-changed: Use O_SYNC rather than O_DSYNC for "rwd". Is this correct?
+                    // imode |= O_DSYNC;
+                    imode |= O_SYNC;
                 } else {
-                    this.mode = -1;
+                    imode = -1;
                 }
             }
         }
-
-        if (this.mode < 0) {
+        if (imode < 0) {
             throw new IllegalArgumentException("Illegal mode \"" + mode
                                                + "\" must be one of "
                                                + "\"r\", \"rw\", \"rws\","
                                                + " or \"rwd\"");
         }
-
+        // Android-removed: do not use legacy security code
+        /*
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            security.checkRead(name);
+            if (rw) {
+                security.checkWrite(name);
+            }
+        }
+        */
         if (name == null) {
+            // Android-changed: different exception message in ctor when file == null.
+            // throw new NullPointerException();
             throw new NullPointerException("file == null");
         }
-
         if (file.isInvalid()) {
             throw new FileNotFoundException("Invalid file path");
         }
         this.path = name;
+        this.mode = imode;
 
-        // Android-changed: Use IoBridge.open() instead of open.
-        fd = IoBridge.open(file.getPath(), this.mode);
+        // BEGIN Android-changed: Use IoBridge.open() instead of open.
+        fd = IoBridge.open(name, imode);
         if (syncMetadata) {
             try {
                 fd.sync();
@@ -261,6 +280,7 @@
             }
         }
         guard.open("close");
+        // END Android-changed: Use IoBridge.open() instead of open.
     }
 
     /**
@@ -321,6 +341,8 @@
      *                          end-of-file has been reached.
      */
     public int read() throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
+        // return read0();
         return (read(scratch, 0, 1) != -1) ? scratch[0] & 0xff : -1;
     }
 
@@ -332,6 +354,7 @@
      * @exception IOException If an I/O error has occurred.
      */
     private int readBytes(byte b[], int off, int len) throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
         ioTracker.trackIo(len, IoTracker.Mode.READ);
         return IoBridge.read(fd, b, off, len);
     }
@@ -474,6 +497,8 @@
      * @exception  IOException  if an I/O error occurs.
      */
     public void write(int b) throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
+        // write0(b);
         scratch[0] = (byte) (b & 0xff);
         write(scratch, 0, 1);
     }
@@ -481,11 +506,13 @@
     /**
      * Writes a sub array as a sequence of bytes.
      * @param b the data to be written
+
      * @param off the start offset in the data
      * @param len the number of bytes that are written
      * @exception IOException If an I/O error has occurred.
      */
     private void writeBytes(byte b[], int off, int len) throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
         ioTracker.trackIo(len, IoTracker.Mode.WRITE);
         IoBridge.write(fd, b, off, len);
         // if we are in "rws" mode, attempt to sync file+metadata
@@ -528,6 +555,7 @@
      * @exception  IOException  if an I/O error occurs.
      */
     public long getFilePointer() throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
         try {
             return Libcore.os.lseek(fd, 0L, SEEK_CUR);
         } catch (ErrnoException errnoException) {
@@ -543,21 +571,26 @@
      * change only by writing after the offset has been set beyond the end
      * of the file.
      *
-     * @param      offset   the offset position, measured in bytes from the
+     * @param      pos   the offset position, measured in bytes from the
      *                   beginning of the file, at which to set the file
      *                   pointer.
      * @exception  IOException  if {@code pos} is less than
      *                          {@code 0} or if an I/O error occurs.
      */
-    public void seek(long offset) throws IOException {
-        if (offset < 0) {
-            throw new IOException("offset < 0: " + offset);
-        }
-        try {
-            Libcore.os.lseek(fd, offset, SEEK_SET);
-            ioTracker.reset();
-        } catch (ErrnoException errnoException) {
-            throw errnoException.rethrowAsIOException();
+    public void seek(long pos) throws IOException {
+        if (pos < 0) {
+            // Android-changed: different exception message for seek(-1).
+            // throw new IOException("Negative seek offset");
+            throw new IOException("offset < 0: " + pos);
+        } else {
+            // Android-changed: Implement on top of low-level API, not directly natively.
+            // seek0(pos);
+            try {
+                Libcore.os.lseek(fd, pos, SEEK_SET);
+                ioTracker.reset();
+            } catch (ErrnoException errnoException) {
+                throw errnoException.rethrowAsIOException();
+            }
         }
     }
 
@@ -568,6 +601,7 @@
      * @exception  IOException  if an I/O error occurs.
      */
     public long length() throws IOException {
+        // Android-changed: Implement on top of low-level API, not directly natively.
         try {
             return Libcore.os.fstat(fd).st_size;
         } catch (ErrnoException errnoException) {
@@ -595,6 +629,7 @@
      * @since      1.2
      */
     public void setLength(long newLength) throws IOException {
+        // BEGIN Android-changed: Implement on top of low-level API, not directly natively.
         if (newLength < 0) {
             throw new IllegalArgumentException("newLength < 0");
         }
@@ -612,6 +647,7 @@
         if (syncMetadata) {
             fd.sync();
         }
+        // END Android-changed: Implement on top of low-level API, not directly natively.
     }
 
 
@@ -638,10 +674,12 @@
             closed = true;
         }
 
+        // BEGIN Android-changed: Implement on top of low-level API, not directly natively.
         if (channel != null && channel.isOpen()) {
             channel.close();
         }
         IoBridge.closeAndSignalBlockedThreads(fd);
+        // END Android-changed: Implement on top of low-level API, not directly natively.
     }
 
     //
@@ -1166,6 +1204,7 @@
         DataOutputStream.writeUTF(str, this);
     }
 
+    // Android-added: use finalize() to detect if not close()d.
     @Override protected void finalize() throws Throwable {
         try {
             if (guard != null) {
diff --git a/ojluni/src/main/java/java/lang/RuntimePermission.java b/ojluni/src/main/java/java/lang/RuntimePermission.java
index 19dff55..2d05ba1 100644
--- a/ojluni/src/main/java/java/lang/RuntimePermission.java
+++ b/ojluni/src/main/java/java/lang/RuntimePermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/lang/SecurityManager.java b/ojluni/src/main/java/java/lang/SecurityManager.java
index 64f2d53..5ef885e 100644
--- a/ojluni/src/main/java/java/lang/SecurityManager.java
+++ b/ojluni/src/main/java/java/lang/SecurityManager.java
@@ -30,6 +30,10 @@
 import java.io.FileDescriptor;
 import java.net.InetAddress;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// SecurityManager can only check access by Java code, so it can be bypassed by using
+// native code.  Applications should rely on Android permissions, process separation,
+// other other methods for security purposes.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/lang/reflect/ReflectPermission.java b/ojluni/src/main/java/java/lang/reflect/ReflectPermission.java
index 96a2d21..a5e5be1 100644
--- a/ojluni/src/main/java/java/lang/reflect/ReflectPermission.java
+++ b/ojluni/src/main/java/java/lang/reflect/ReflectPermission.java
@@ -25,6 +25,8 @@
 
 package java.lang.reflect;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/net/NetPermission.java b/ojluni/src/main/java/java/net/NetPermission.java
index 8eb7892..b5a0eab 100644
--- a/ojluni/src/main/java/java/net/NetPermission.java
+++ b/ojluni/src/main/java/java/net/NetPermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/net/SocketPermission.java b/ojluni/src/main/java/java/net/SocketPermission.java
index cdd9f15..2195ecc 100644
--- a/ojluni/src/main/java/java/net/SocketPermission.java
+++ b/ojluni/src/main/java/java/net/SocketPermission.java
@@ -28,6 +28,8 @@
 import java.security.Permission;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/AccessControlContext.java b/ojluni/src/main/java/java/security/AccessControlContext.java
index e95cff2..506898f 100644
--- a/ojluni/src/main/java/java/security/AccessControlContext.java
+++ b/ojluni/src/main/java/java/security/AccessControlContext.java
@@ -30,6 +30,8 @@
 import java.util.List;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/AccessController.java b/ojluni/src/main/java/java/security/AccessController.java
index b4d544c..ad844ba 100644
--- a/ojluni/src/main/java/java/security/AccessController.java
+++ b/ojluni/src/main/java/java/security/AccessController.java
@@ -27,6 +27,8 @@
 package java.security;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/AllPermission.java b/ojluni/src/main/java/java/security/AllPermission.java
index 20e452b..61bcaea 100644
--- a/ojluni/src/main/java/java/security/AllPermission.java
+++ b/ojluni/src/main/java/java/security/AllPermission.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/AuthProvider.java b/ojluni/src/main/java/java/security/AuthProvider.java
index 23ddb0a..e87daa9 100644
--- a/ojluni/src/main/java/java/security/AuthProvider.java
+++ b/ojluni/src/main/java/java/security/AuthProvider.java
@@ -29,6 +29,8 @@
 import javax.security.auth.login.LoginException;
 import javax.security.auth.callback.CallbackHandler;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/BasicPermission.java b/ojluni/src/main/java/java/security/BasicPermission.java
index 0a069b0..1836b10 100644
--- a/ojluni/src/main/java/java/security/BasicPermission.java
+++ b/ojluni/src/main/java/java/security/BasicPermission.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/CodeSource.java b/ojluni/src/main/java/java/security/CodeSource.java
index 7396d91..fce8aa1 100644
--- a/ojluni/src/main/java/java/security/CodeSource.java
+++ b/ojluni/src/main/java/java/security/CodeSource.java
@@ -35,6 +35,8 @@
 import java.io.IOException;
 import java.security.cert.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/DomainCombiner.java b/ojluni/src/main/java/java/security/DomainCombiner.java
index 5426bf6..e9c010f 100644
--- a/ojluni/src/main/java/java/security/DomainCombiner.java
+++ b/ojluni/src/main/java/java/security/DomainCombiner.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/Permission.java b/ojluni/src/main/java/java/security/Permission.java
index 8d170c0..54163b9 100644
--- a/ojluni/src/main/java/java/security/Permission.java
+++ b/ojluni/src/main/java/java/security/Permission.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/PermissionCollection.java b/ojluni/src/main/java/java/security/PermissionCollection.java
index e356524..f1015e3 100644
--- a/ojluni/src/main/java/java/security/PermissionCollection.java
+++ b/ojluni/src/main/java/java/security/PermissionCollection.java
@@ -27,6 +27,8 @@
 
 import java.util.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/Permissions.java b/ojluni/src/main/java/java/security/Permissions.java
index 7411e06..9796f01 100644
--- a/ojluni/src/main/java/java/security/Permissions.java
+++ b/ojluni/src/main/java/java/security/Permissions.java
@@ -29,6 +29,8 @@
 import java.io.Serializable;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/Policy.java b/ojluni/src/main/java/java/security/Policy.java
index 71c6cd0..cb7fb3b 100644
--- a/ojluni/src/main/java/java/security/Policy.java
+++ b/ojluni/src/main/java/java/security/Policy.java
@@ -29,9 +29,8 @@
 
 import java.util.Enumeration;
 
-
-/* Not used on Android, removed most of the code and made the class methods no-ops */
-
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/PrivilegedAction.java b/ojluni/src/main/java/java/security/PrivilegedAction.java
index bef7e44..5844b4d 100644
--- a/ojluni/src/main/java/java/security/PrivilegedAction.java
+++ b/ojluni/src/main/java/java/security/PrivilegedAction.java
@@ -26,6 +26,8 @@
 package java.security;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/PrivilegedActionException.java b/ojluni/src/main/java/java/security/PrivilegedActionException.java
index 83d855a..b1eb28f 100644
--- a/ojluni/src/main/java/java/security/PrivilegedActionException.java
+++ b/ojluni/src/main/java/java/security/PrivilegedActionException.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  *
diff --git a/ojluni/src/main/java/java/security/PrivilegedExceptionAction.java b/ojluni/src/main/java/java/security/PrivilegedExceptionAction.java
index bae883e..4023150 100644
--- a/ojluni/src/main/java/java/security/PrivilegedExceptionAction.java
+++ b/ojluni/src/main/java/java/security/PrivilegedExceptionAction.java
@@ -26,6 +26,8 @@
 package java.security;
 
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/ProtectionDomain.java b/ojluni/src/main/java/java/security/ProtectionDomain.java
index 7cacc35..9e117a6 100644
--- a/ojluni/src/main/java/java/security/ProtectionDomain.java
+++ b/ojluni/src/main/java/java/security/ProtectionDomain.java
@@ -26,6 +26,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/SecurityPermission.java b/ojluni/src/main/java/java/security/SecurityPermission.java
index 7d2ec47..f02755c 100644
--- a/ojluni/src/main/java/java/security/SecurityPermission.java
+++ b/ojluni/src/main/java/java/security/SecurityPermission.java
@@ -25,6 +25,8 @@
 
 package java.security;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/UnresolvedPermission.java b/ojluni/src/main/java/java/security/UnresolvedPermission.java
index 6d97fbe..6f3bf4a 100644
--- a/ojluni/src/main/java/java/security/UnresolvedPermission.java
+++ b/ojluni/src/main/java/java/security/UnresolvedPermission.java
@@ -34,6 +34,8 @@
 import java.lang.reflect.*;
 import java.security.cert.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/security/acl/Permission.java b/ojluni/src/main/java/java/security/acl/Permission.java
index cd84a48..72412de 100644
--- a/ojluni/src/main/java/java/security/acl/Permission.java
+++ b/ojluni/src/main/java/java/security/acl/Permission.java
@@ -25,6 +25,8 @@
 
 package java.security.acl;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/sql/SQLPermission.java b/ojluni/src/main/java/java/sql/SQLPermission.java
index 050f763..505202c 100644
--- a/ojluni/src/main/java/java/sql/SQLPermission.java
+++ b/ojluni/src/main/java/java/sql/SQLPermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java b/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java
index 0e45290..91d3a4c 100644
--- a/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java
+++ b/ojluni/src/main/java/java/time/zone/IcuZoneRulesProvider.java
@@ -1,18 +1,24 @@
 /*
  * Copyright (C) 2016 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
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  The Android Open Source
+ * Project designates this particular file as subject to the "Classpath"
+ * exception as provided by The Android Open Source Project in the LICENSE
+ * file that accompanied this code.
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * 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.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+
 package java.time.zone;
 
 import android.icu.impl.OlsonTimeZone;
diff --git a/ojluni/src/main/java/java/util/PropertyPermission.java b/ojluni/src/main/java/java/util/PropertyPermission.java
index 8b73ce1..ac7b521 100644
--- a/ojluni/src/main/java/java/util/PropertyPermission.java
+++ b/ojluni/src/main/java/java/util/PropertyPermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/java/util/logging/LoggingPermission.java b/ojluni/src/main/java/java/util/logging/LoggingPermission.java
index 23c5432..5cea7a5 100644
--- a/ojluni/src/main/java/java/util/logging/LoggingPermission.java
+++ b/ojluni/src/main/java/java/util/logging/LoggingPermission.java
@@ -26,6 +26,8 @@
 
 package java.util.logging;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/crypto/CryptoAllPermission.java b/ojluni/src/main/java/javax/crypto/CryptoAllPermission.java
index 24268b8..8a973fc 100644
--- a/ojluni/src/main/java/javax/crypto/CryptoAllPermission.java
+++ b/ojluni/src/main/java/javax/crypto/CryptoAllPermission.java
@@ -25,6 +25,8 @@
 
 package javax.crypto;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/crypto/CryptoPermission.java b/ojluni/src/main/java/javax/crypto/CryptoPermission.java
index ec09287..56973b6 100644
--- a/ojluni/src/main/java/javax/crypto/CryptoPermission.java
+++ b/ojluni/src/main/java/javax/crypto/CryptoPermission.java
@@ -28,6 +28,8 @@
 import java.security.*;
 import java.security.spec.AlgorithmParameterSpec;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/crypto/CryptoPermissions.java b/ojluni/src/main/java/javax/crypto/CryptoPermissions.java
index 0e62b18..eef08b7 100644
--- a/ojluni/src/main/java/javax/crypto/CryptoPermissions.java
+++ b/ojluni/src/main/java/javax/crypto/CryptoPermissions.java
@@ -31,6 +31,8 @@
 import java.io.InputStream;
 import java.io.IOException;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/crypto/CryptoPolicyParser.java b/ojluni/src/main/java/javax/crypto/CryptoPolicyParser.java
index a5a3818..10bdc55 100644
--- a/ojluni/src/main/java/javax/crypto/CryptoPolicyParser.java
+++ b/ojluni/src/main/java/javax/crypto/CryptoPolicyParser.java
@@ -29,6 +29,8 @@
 
 import java.security.GeneralSecurityException;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/crypto/JceSecurityManager.java b/ojluni/src/main/java/javax/crypto/JceSecurityManager.java
index 38d9f19..aafaa58 100644
--- a/ojluni/src/main/java/javax/crypto/JceSecurityManager.java
+++ b/ojluni/src/main/java/javax/crypto/JceSecurityManager.java
@@ -25,6 +25,8 @@
 
 package javax.crypto;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/net/ssl/HttpsURLConnection.java b/ojluni/src/main/java/javax/net/ssl/HttpsURLConnection.java
index 9660643..ec4254a 100644
--- a/ojluni/src/main/java/javax/net/ssl/HttpsURLConnection.java
+++ b/ojluni/src/main/java/javax/net/ssl/HttpsURLConnection.java
@@ -178,6 +178,10 @@
         }
     }
 
+    // BEGIN Android-changed: Use lazily-created OkHttp hostname verifier
+    // The RI default hostname verifier is a static member of the class, which means
+    // it's created when the class is initialized.  As well, its default verifier
+    // just fails all verification attempts, whereas we use OkHttp's verifier.
     /*
      * Holds the default instance so class preloading doesn't create an instance of
      * it.
@@ -207,6 +211,7 @@
      * The <code>hostnameVerifier</code> for this object.
      */
     protected HostnameVerifier hostnameVerifier;
+    // END Android-changed: Use lazily-created OkHttp hostname verifier
 
     /**
      * Sets the default <code>HostnameVerifier</code> inherited by a
@@ -279,6 +284,7 @@
      * @see #setDefaultHostnameVerifier(HostnameVerifier)
      */
     public HostnameVerifier getHostnameVerifier() {
+        // Android-added: Use the default verifier if none is set
         if (hostnameVerifier == null) {
             hostnameVerifier = NoPreloadHolder.defaultHostnameVerifier;
         }
diff --git a/ojluni/src/main/java/javax/net/ssl/SNIServerName.java b/ojluni/src/main/java/javax/net/ssl/SNIServerName.java
index c5bb253..1ef9d05 100644
--- a/ojluni/src/main/java/javax/net/ssl/SNIServerName.java
+++ b/ojluni/src/main/java/javax/net/ssl/SNIServerName.java
@@ -210,3 +210,4 @@
         return sb.toString();
     }
 }
+
diff --git a/ojluni/src/main/java/javax/net/ssl/SSLContext.java b/ojluni/src/main/java/javax/net/ssl/SSLContext.java
index 71cfc23..4105282 100644
--- a/ojluni/src/main/java/javax/net/ssl/SSLContext.java
+++ b/ojluni/src/main/java/javax/net/ssl/SSLContext.java
@@ -178,7 +178,7 @@
      * @return the new <code>SSLContext</code> object.
      *
      * @exception NoSuchAlgorithmException if no Provider supports a
-     *          TrustManagerFactorySpi implementation for the
+     *          SSLContextSpi implementation for the
      *          specified protocol.
      * @exception NullPointerException if protocol is null.
      *
diff --git a/ojluni/src/main/java/javax/net/ssl/SSLEngine.java b/ojluni/src/main/java/javax/net/ssl/SSLEngine.java
index 26dc64c..20d7fa9 100644
--- a/ojluni/src/main/java/javax/net/ssl/SSLEngine.java
+++ b/ojluni/src/main/java/javax/net/ssl/SSLEngine.java
@@ -329,6 +329,7 @@
  * is saved.  All future delegated tasks will be processed using this
  * context:  that is, all access control decisions will be made using the
  * context captured at engine creation.
+ *
  * <HR>
  *
  * <B>Concurrency Notes</B>:
@@ -404,600 +405,600 @@
  *
  * <h4>Cipher suites</h4>
  * <table>
- *     <thead>
- *         <tr>
- *             <th>Cipher suite</th>
- *             <th>Supported (API Levels)</th>
- *             <th>Enabled by default (API Levels)</th>
- *         </tr>
- *     </thead>
- *     <tbody>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_RC4_128_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_EXPORT_WITH_RC4_40_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr>
- *             <td>SSL_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_NULL_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_NULL_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_RC4_128_MD5</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_RC4_128_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;23</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;22</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>20&ndash;22</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>20&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_DSS_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_RSA_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_NULL_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;23</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_NULL_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_RC4_128_SHA</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;23</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_NULL_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_NULL_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_RC4_128_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_NULL_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_RC4_128_SHA</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_EMPTY_RENEGOTIATION_INFO_SCSV</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_FALLBACK_SCSV</td>
- *             <td>21+</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_NULL_WITH_NULL_NULL</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_PSK_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>21&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_PSK_WITH_AES_128_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_PSK_WITH_AES_256_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_PSK_WITH_RC4_128_SHA</td>
- *             <td>21&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>9+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_DES_CBC_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td>1&ndash;8</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_NULL_MD5</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_NULL_SHA</td>
- *             <td>1&ndash;8</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_NULL_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *     </tbody>
+ *   <thead>
+ *     <tr>
+ *       <th>Cipher suite</th>
+ *       <th>Supported (API Levels)</th>
+ *       <th>Enabled by default (API Levels)</th>
+ *     </tr>
+ *   </thead>
+ *   <tbody>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_RC4_128_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_EXPORT_WITH_RC4_40_MD5</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr>
+ *       <td>SSL_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_NULL_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_NULL_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_RC4_128_MD5</td>
+ *       <td>9-25</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_RC4_128_SHA</td>
+ *       <td>9-25</td>
+ *       <td>9-23</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-22</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>20-22</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-25</td>
+ *       <td>9-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-25</td>
+ *       <td>20-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-25</td>
+ *       <td>20-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-25</td>
+ *       <td>20-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_DSS_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_NULL_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</td>
+ *       <td>20-25</td>
+ *       <td>20-23</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_NULL_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_RC4_128_SHA</td>
+ *       <td>20-25</td>
+ *       <td>20-23</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_NULL_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_NULL_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_RC4_128_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_NULL_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_RC4_128_SHA</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_EMPTY_RENEGOTIATION_INFO_SCSV</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_FALLBACK_SCSV</td>
+ *       <td>21+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_NULL_WITH_NULL_NULL</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_PSK_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>21-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_PSK_WITH_AES_128_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_PSK_WITH_AES_256_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_PSK_WITH_RC4_128_SHA</td>
+ *       <td>21-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>9+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>1-8</td>
+ *       <td>1-8</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_NULL_MD5</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_NULL_SHA</td>
+ *       <td>1-8</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_NULL_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *   </tbody>
  * </table>
  *
  * <p><em>NOTE</em>: PSK cipher suites are enabled by default only if the {@code SSLContext} through
@@ -1183,7 +1184,7 @@
      * If this <code>SSLEngine</code> has not yet started its initial
      * handshake, this method will automatically start the handshake.
      * <P>
-     * This method will attempt to produce one SSL/TLS packet, and will
+     * This method will attempt to produce SSL/TLS records, and will
      * consume as much source data as possible, but will never consume
      * more than the sum of the bytes remaining in each buffer.  Each
      * <code>ByteBuffer</code>'s position is updated to reflect the
diff --git a/ojluni/src/main/java/javax/net/ssl/SSLPermission.java b/ojluni/src/main/java/javax/net/ssl/SSLPermission.java
index 0f6b5db..a23e1ce 100644
--- a/ojluni/src/main/java/javax/net/ssl/SSLPermission.java
+++ b/ojluni/src/main/java/javax/net/ssl/SSLPermission.java
@@ -27,6 +27,8 @@
 
 import java.security.*;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/net/ssl/SSLSocket.java b/ojluni/src/main/java/javax/net/ssl/SSLSocket.java
index f2037b4..875ae34 100644
--- a/ojluni/src/main/java/javax/net/ssl/SSLSocket.java
+++ b/ojluni/src/main/java/javax/net/ssl/SSLSocket.java
@@ -218,495 +218,495 @@
  * below. Prior to API Level 9, non-standard (OpenSSL) names had been used (see
  * the table following this table).
  * <table>
- *     <thead>
- *         <tr>
- *             <th>Cipher suite</th>
- *             <th>Supported (API Levels)</th>
- *             <th>Enabled by default (API Levels)</th>
- *         </tr>
- *     </thead>
- *     <tbody>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_DSS_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DHE_RSA_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_DH_anon_WITH_RC4_128_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_EXPORT_WITH_RC4_40_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr>
- *             <td>SSL_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_DES_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_NULL_MD5</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_NULL_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_RC4_128_MD5</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>SSL_RSA_WITH_RC4_128_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;23</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>9&ndash;22</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td>11&ndash;22</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_DSS_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>9&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;TBD</td>
- *             <td>11&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;TBD</td>
- *             <td>20&ndash;TBD</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_CBC_SHA</td>
- *             <td>9&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_DH_anon_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA</td>
- *             <td>11+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA</td>
- *             <td>11+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_NULL_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</td>
- *             <td>11&ndash;TBD</td>
- *             <td>11&ndash;23</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>11+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>11+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_NULL_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDHE_RSA_WITH_RC4_128_SHA</td>
- *             <td>11&ndash;TBD</td>
- *             <td>11&ndash;23</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_NULL_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_NULL_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_RSA_WITH_RC4_128_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td>11&ndash;19</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_NULL_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_ECDH_anon_WITH_RC4_128_SHA</td>
- *             <td>11&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_EMPTY_RENEGOTIATION_INFO_SCSV</td>
- *             <td>11+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_FALLBACK_SCSV</td>
- *             <td>21+</td>
- *             <td></td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_PSK_WITH_3DES_EDE_CBC_SHA</td>
- *             <td>21&ndash;22</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_PSK_WITH_AES_128_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_PSK_WITH_AES_256_CBC_SHA</td>
- *             <td>21+</td>
- *             <td>21+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_PSK_WITH_RC4_128_SHA</td>
- *             <td>21&ndash;TBD</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>9+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_128_GCM_SHA256</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_CBC_SHA</td>
- *             <td>9+</td>
- *             <td>11+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_CBC_SHA256</td>
- *             <td>20+</td>
- *             <td></td>
- *         </tr>
- *         <tr>
- *             <td>TLS_RSA_WITH_AES_256_GCM_SHA384</td>
- *             <td>20+</td>
- *             <td>20+</td>
- *         </tr>
- *         <tr>
- *             <td>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</td>
- *             <td>24+</td>
- *             <td>24+</td>
- *         </tr>
- *         <tr class="deprecated">
- *             <td>TLS_RSA_WITH_NULL_SHA256</td>
- *             <td>20&ndash;22</td>
- *             <td></td>
- *         </tr>
- *     </tbody>
+ *   <thead>
+ *     <tr>
+ *       <th>Cipher suite</th>
+ *       <th>Supported (API Levels)</th>
+ *       <th>Enabled by default (API Levels)</th>
+ *     </tr>
+ *   </thead>
+ *   <tbody>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_DSS_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DHE_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_DH_anon_WITH_RC4_128_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_EXPORT_WITH_RC4_40_MD5</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr>
+ *       <td>SSL_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_DES_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_NULL_MD5</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_NULL_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_RC4_128_MD5</td>
+ *       <td>9-25</td>
+ *       <td>9-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>SSL_RSA_WITH_RC4_128_SHA</td>
+ *       <td>9-25</td>
+ *       <td>9-23</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>9-22</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td>11-22</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_DSS_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-25</td>
+ *       <td>9-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-25</td>
+ *       <td>20-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-25</td>
+ *       <td>11-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-25</td>
+ *       <td>20-25</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_CBC_SHA</td>
+ *       <td>9-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_DH_anon_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>11+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>11+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_NULL_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</td>
+ *       <td>11-25</td>
+ *       <td>11-23</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>11+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>11+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</td>
+ *       <td>24+</td>
+ *       <td>24+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_NULL_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDHE_RSA_WITH_RC4_128_SHA</td>
+ *       <td>11-25</td>
+ *       <td>11-23</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_NULL_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_NULL_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_RSA_WITH_RC4_128_SHA</td>
+ *       <td>11-22</td>
+ *       <td>11-19</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_NULL_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_ECDH_anon_WITH_RC4_128_SHA</td>
+ *       <td>11-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_EMPTY_RENEGOTIATION_INFO_SCSV</td>
+ *       <td>11+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_FALLBACK_SCSV</td>
+ *       <td>21+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_PSK_WITH_3DES_EDE_CBC_SHA</td>
+ *       <td>21-22</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_PSK_WITH_AES_128_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_PSK_WITH_AES_256_CBC_SHA</td>
+ *       <td>21+</td>
+ *       <td>21+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_PSK_WITH_RC4_128_SHA</td>
+ *       <td>21-25</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>9+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_128_GCM_SHA256</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_CBC_SHA</td>
+ *       <td>9+</td>
+ *       <td>11+</td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_CBC_SHA256</td>
+ *       <td>20+</td>
+ *       <td></td>
+ *     </tr>
+ *     <tr>
+ *       <td>TLS_RSA_WITH_AES_256_GCM_SHA384</td>
+ *       <td>20+</td>
+ *       <td>20+</td>
+ *     </tr>
+ *     <tr class="deprecated">
+ *       <td>TLS_RSA_WITH_NULL_SHA256</td>
+ *       <td>20-22</td>
+ *       <td></td>
+ *     </tr>
+ *   </tbody>
  * </table>
  *
  * <p><em>NOTE</em>: PSK cipher suites are enabled by default only if the {@code SSLContext} through
diff --git a/ojluni/src/main/java/javax/security/auth/AuthPermission.java b/ojluni/src/main/java/javax/security/auth/AuthPermission.java
index 651e9a3..71c3aaf 100644
--- a/ojluni/src/main/java/javax/security/auth/AuthPermission.java
+++ b/ojluni/src/main/java/javax/security/auth/AuthPermission.java
@@ -25,6 +25,8 @@
 
 package javax.security.auth;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/security/auth/PrivateCredentialPermission.java b/ojluni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
index ca52a1b2..9733932 100644
--- a/ojluni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
+++ b/ojluni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
@@ -29,6 +29,8 @@
 import java.security.Permission;
 import java.security.Principal;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/javax/security/auth/SubjectDomainCombiner.java b/ojluni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
index 8e07d4b..868ed5f 100644
--- a/ojluni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
+++ b/ojluni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
@@ -27,6 +27,8 @@
 
 import java.security.ProtectionDomain;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/jdk/net/NetworkPermission.java b/ojluni/src/main/java/jdk/net/NetworkPermission.java
index 420c74f..96d7a8e 100644
--- a/ojluni/src/main/java/jdk/net/NetworkPermission.java
+++ b/ojluni/src/main/java/jdk/net/NetworkPermission.java
@@ -27,6 +27,8 @@
 
 import java.security.BasicPermission;
 
+// Android-changed: Stubbed the implementation.  Android doesn't support SecurityManager.
+// See comments in java.lang.SecurityManager for details.
 /**
  * Legacy security code; do not use.
  */
diff --git a/ojluni/src/main/java/sun/security/jca/JCAUtil.java b/ojluni/src/main/java/sun/security/jca/JCAUtil.java
index b7bae41..fde9be5 100644
--- a/ojluni/src/main/java/sun/security/jca/JCAUtil.java
+++ b/ojluni/src/main/java/sun/security/jca/JCAUtil.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,12 +41,6 @@
         // no instantiation
     }
 
-    // lock to use for synchronization
-    private static final Object LOCK = JCAUtil.class;
-
-    // cached SecureRandom instance
-    private static volatile SecureRandom secureRandom;
-
     // size of the temporary arrays we use. Should fit into the CPU's 1st
     // level cache and could be adjusted based on the platform
     private final static int ARRAY_SIZE = 4096;
@@ -60,26 +54,19 @@
         return Math.min(ARRAY_SIZE, totalSize);
     }
 
+    // cached SecureRandom instance
+    private static class CachedSecureRandomHolder {
+        public static SecureRandom instance = new SecureRandom();
+    }
+
     /**
-     * Get a SecureRandom instance. This method should me used by JDK
+     * Get a SecureRandom instance. This method should be used by JDK
      * internal code in favor of calling "new SecureRandom()". That needs to
      * iterate through the provider table to find the default SecureRandom
      * implementation, which is fairly inefficient.
      */
     public static SecureRandom getSecureRandom() {
-        // we use double checked locking to minimize synchronization
-        // works because we use a volatile reference
-        SecureRandom r = secureRandom;
-        if (r == null) {
-            synchronized (LOCK) {
-                r = secureRandom;
-                if (r == null) {
-                    r = new SecureRandom();
-                    secureRandom = r;
-                }
-            }
-        }
-        return r;
+        return CachedSecureRandomHolder.instance;
     }
 
 }
diff --git a/ojluni/src/main/java/sun/security/util/DerInputStream.java b/ojluni/src/main/java/sun/security/util/DerInputStream.java
index b182d4e..6608676 100644
--- a/ojluni/src/main/java/sun/security/util/DerInputStream.java
+++ b/ojluni/src/main/java/sun/security/util/DerInputStream.java
@@ -325,6 +325,7 @@
      *          (used to initialize an auto-growing data structure)
      * @return array of the values in the sequence
      */
+    // BEGIN Android-changed: Original encoded form needed for APKs parsing/validation
     public DerValue[] getSequence(int startLen,
             boolean originalEncodedFormRetained) throws IOException {
         tag = (byte)buffer.read();
@@ -347,6 +348,7 @@
         return getSequence(
                 startLen,
                 false); // no need to retain original encoded form
+        // END Android-changed: Original encoded form needed for APKs parsing/validation
     }
 
     /**
@@ -379,6 +381,7 @@
      */
     public DerValue[] getSet(int startLen, boolean implicit)
         throws IOException {
+        // BEGIN Android-changed: Original encoded form needed for APKs parsing/validation
         return getSet(
             startLen,
             implicit,
@@ -395,6 +398,7 @@
             }
         }
         return (readVector(startLen, originalEncodedFormRetained));
+        // END Android-changed: Original encoded form needed for APKs parsing/validation
     }
 
     /*
@@ -403,6 +407,7 @@
      * this same helper routine.
      */
     protected DerValue[] readVector(int startLen) throws IOException {
+        // BEGIN Android-changed: Original encoded form needed for APKs parsing/validation
         return readVector(
             startLen,
             false); // no need to retain original encoded form
@@ -415,6 +420,7 @@
      */
     protected DerValue[] readVector(int startLen,
             boolean originalEncodedFormRetained) throws IOException {
+        // END Android-changed: Original encoded form needed for APKs parsing/validation
         DerInputStream  newstr;
 
         byte lenByte = (byte)buffer.read();
@@ -459,6 +465,7 @@
         DerValue value;
 
         do {
+            // Android-changed: Original encoded form needed for APKs parsing/validation
             value = new DerValue(newstr.buffer, originalEncodedFormRetained);
             vec.addElement(value);
         } while (newstr.available() > 0);
diff --git a/ojluni/src/main/java/sun/security/util/DerValue.java b/ojluni/src/main/java/sun/security/util/DerValue.java
index 21116dc..3045995 100644
--- a/ojluni/src/main/java/sun/security/util/DerValue.java
+++ b/ojluni/src/main/java/sun/security/util/DerValue.java
@@ -72,11 +72,13 @@
 
     private int                 length;
 
+    // BEGIN Android-added: Original encoded form needed for APKs parsing/validation
     /**
      * The original encoded form of the whole value (tag, length, and value)
      * or null if the form was not provided or was not retained during parsing.
      */
     private byte[]              originalEncodedForm;
+    // END Android-added: Original encoded form needed for APKs parsing/validation
 
     /*
      * The type starts at the first byte of the encoding, and
@@ -249,6 +251,7 @@
     /*
      * package private
      */
+    // BEGIN Android-changed: Original encoded form needed for APKs parsing/validation
     DerValue(DerInputBuffer in, boolean originalEncodedFormRetained)
             throws IOException {
         // XXX must also parse BER-encoded constructed
@@ -294,6 +297,7 @@
             int consumed = in.getPos() - startPosInInput;
             originalEncodedForm = in.getSlice(startPosInInput, consumed);
         }
+    // END Android-changed: Original encoded form needed for APKs parsing/validation
     }
 
     /**
@@ -834,6 +838,7 @@
         }
     }
 
+    // BEGIN Android-added: Original encoded form needed for APKs parsing/validation
     /**
      * Returns the original encoded form or {@code null} if the form was not
      * retained or is not available.
@@ -842,6 +847,7 @@
         return (originalEncodedForm != null)
                 ? originalEncodedForm.clone() : null;
     }
+    // END Android-added: Original encoded form needed for APKs parsing/validation
 
     /**
      * Returns a DER-encoded value, such that if it's passed to the
diff --git a/ojluni/src/main/java/sun/security/util/DisabledAlgorithmConstraints.java b/ojluni/src/main/java/sun/security/util/DisabledAlgorithmConstraints.java
index aecb341..a46b318 100644
--- a/ojluni/src/main/java/sun/security/util/DisabledAlgorithmConstraints.java
+++ b/ojluni/src/main/java/sun/security/util/DisabledAlgorithmConstraints.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,6 +95,7 @@
     @Override
     final public boolean permits(Set<CryptoPrimitive> primitives,
             String algorithm, AlgorithmParameters parameters) {
+
         if (primitives == null || primitives.isEmpty()) {
             throw new IllegalArgumentException(
                         "No cryptographic primitive specified");
@@ -297,6 +298,7 @@
                         c = new jdkCAConstraint(algorithm);
                         jdkCALimit = true;
                     }
+
                     // Link multiple conditions for a single constraint
                     // into a linked list.
                     if (lastConstraint == null) {
diff --git a/ojluni/src/main/java/sun/security/util/KeyUtil.java b/ojluni/src/main/java/sun/security/util/KeyUtil.java
index e3efcff..c12a4ce 100644
--- a/ojluni/src/main/java/sun/security/util/KeyUtil.java
+++ b/ojluni/src/main/java/sun/security/util/KeyUtil.java
@@ -1,6 +1,6 @@
 /*
  * Copyright 2016 The Android Open Source Project
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012,2016 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,18 +91,8 @@
             // END Android-changed
         } else if (key instanceof DSAKey) {
             DSAKey pubk = (DSAKey)key;
-            // BEGIN Android-changed
-            // Was: size = pubk.getParams().getP().bitLength();
-            DSAParams params = pubk.getParams();
-            // According to RFC 3279 section 2.3.2, DSA keys are allowed
-            // to inherit parameters in an X.509 certificate issuer's
-            // key parameters, so the parameters may be null. The parent
-            // key will be rejected if its parameters don't pass, so this
-            // is okay.
-            if (params != null) {
-                size = params.getP().bitLength();
-            }
-            // END Android-changed
+            DSAParams params = pubk.getParams();    // params can be null
+            size = (params != null) ? params.getP().bitLength() : -1;
         } else if (key instanceof DHKey) {
             DHKey pubk = (DHKey)key;
             size = pubk.getParams().getP().bitLength();
@@ -163,8 +153,6 @@
 
     /**
      * Returns whether the specified provider is Oracle provider or not.
-     * <P>
-     * Note that this method is only apply to SunJCE and SunPKCS11 at present.
      *
      * @param  providerName
      *         the provider name
@@ -172,8 +160,11 @@
      *         {@code providerName} is Oracle provider
      *
     public static final boolean isOracleJCEProvider(String providerName) {
-        return providerName != null && (providerName.equals("SunJCE") ||
-                                        providerName.startsWith("SunPKCS11"));
+        return providerName != null &&
+                (providerName.equals("SunJCE") ||
+                    providerName.equals("SunMSCAPI") ||
+                    providerName.equals("OracleUcrypto") ||
+                    providerName.startsWith("SunPKCS11"));
     }
 
     /**
@@ -218,7 +209,7 @@
             byte[] encoded, boolean isFailOver) {
 
         if (random == null) {
-            random = new SecureRandom();
+            random = JCAUtil.getSecureRandom();
         }
         byte[] replacer = new byte[48];
         random.nextBytes(replacer);
@@ -322,5 +313,5 @@
     }
     */
     // END Android-removed
-}
 
+}
diff --git a/ojluni/src/main/java/sun/security/x509/AVA.java b/ojluni/src/main/java/sun/security/x509/AVA.java
index ff9c62a..a047500 100644
--- a/ojluni/src/main/java/sun/security/x509/AVA.java
+++ b/ojluni/src/main/java/sun/security/x509/AVA.java
@@ -150,9 +150,6 @@
 
     /**
      * Parse an AVA string formatted according to format.
-     *
-     * XXX format RFC1779 should only allow RFC1779 syntax but is
-     * actually DEFAULT with RFC1779 keywords.
      */
     AVA(Reader in, int format) throws IOException {
         this(in, format, Collections.<String, String>emptyMap());
@@ -272,7 +269,7 @@
                 break;
             }
 
-            // Android-changed: Skip trailing whitespace.
+            // BEGIN Android-added: AVA: Support DerValue hex strings that contain ' ' or '\n'
             if (c == ' ' || c == '\n') {
                 do {
                     if (c != ' ' && c != '\n') {
@@ -282,7 +279,7 @@
                 } while (!isTerminator(c, format));
                 break;
             }
-
+            // END Android-added: AVA: Support DerValue hex strings that contain ' ' or '\n'
             int cVal = hexDigits.indexOf(Character.toUpperCase((char)c));
 
             if (cVal == -1) {
@@ -384,11 +381,17 @@
                 PRESERVE_OLD_DC_ENCODING == false)) {
             // EmailAddress and DomainComponent must be IA5String
             return new DerValue(DerValue.tag_IA5String,
+            // Android-changed: Do not trim() DerValue strings.
+            //                            temp.toString().trim());
                                         temp.toString());
         } else if (isPrintableString) {
+            // Android-changed: Do not trim() DerValue strings.
+            //return new DerValue(temp.toString().trim());
             return new DerValue(temp.toString());
         } else {
             return new DerValue(DerValue.tag_UTF8String,
+            // Android-changed: Do not trim() DerValue strings.
+            //                            temp.toString().trim());
                                         temp.toString());
         }
     }
@@ -900,6 +903,8 @@
          * the dotted-decimal form.
          */
         if ((typeAndValue.charAt(0) >= '0' && typeAndValue.charAt(0) <= '9') ||
+            // Android-changed: AVA: Support DerValue hex strings that contain ' ' or '\n'
+            //!isDerString(value, true))
             (!isDerString(value, true) && value.tag != DerValue.tag_T61String))
         {
             byte[] data = null;
diff --git a/ojluni/src/main/java/sun/security/x509/AlgorithmId.java b/ojluni/src/main/java/sun/security/x509/AlgorithmId.java
index 378ca2f..260d4aa 100644
--- a/ojluni/src/main/java/sun/security/x509/AlgorithmId.java
+++ b/ojluni/src/main/java/sun/security/x509/AlgorithmId.java
@@ -121,18 +121,14 @@
         try {
             algParams = AlgorithmParameters.getInstance(algidString);
         } catch (NoSuchAlgorithmException e) {
-            // BEGIN Android-changed
-            // It was searching for the EC parameters in an internal provider in the deleted package
-            // sun.security.ec before setting them to null. Since EC is in the OpenSSL provider,
-            // there's no need for such fallback. Setting it to null directly.
             /*
              * This algorithm parameter type is not supported, so we cannot
              * parse the parameters.
              */
             algParams = null;
             return;
-            // END Android-changed
         }
+
         // Decode (parse) the parameters
         algParams.init(params.toByteArray());
     }
@@ -246,11 +242,13 @@
             }
         }
 
+        // BEGIN Android-added: Update algorithm mapping tables for names when OID is used
         // Try to update the name <-> OID mapping table.
         synchronized (oidTable) {
             reinitializeMappingTableLocked();
             algName = nameTable.get(algid);
         }
+        // END Android-added: Update algorithm mapping tables for names when OID is used
 
         return (algName == null) ? algid.toString() : algName;
     }
@@ -566,6 +564,7 @@
 
         // See if any of the installed providers supply a mapping from
         // the given algorithm name to an OID string
+        // BEGIN Android-changed: Update algorithm mapping tables for names when OID is used
         synchronized (oidTable) {
             reinitializeMappingTableLocked();
             return oidTable.get(name.toUpperCase(Locale.ENGLISH));
@@ -644,17 +643,20 @@
 
             initOidTableVersion = currentVersion;
         }
+    // END Android-changed: Update algorithm mapping tables for names when OID is used
     }
 
     private static ObjectIdentifier oid(int ... values) {
         return ObjectIdentifier.newInternal(values);
     }
 
+    // BEGIN Android-changed: Parsing mapping as OID even if "OID." prefix isn't specified
     private static int initOidTableVersion = -1;
     private static final Map<String,ObjectIdentifier> oidTable =
         new HashMap<String,ObjectIdentifier>(1);
     private static final Map<ObjectIdentifier,String> nameTable =
         new HashMap<ObjectIdentifier,String>();
+    // END Android-changed: Parsing mapping as OID even if "OID." prefix isn't specified
 
     /*****************************************************************/
 
@@ -939,6 +941,8 @@
      */
         sha1WithDSA_oid = ObjectIdentifier.newInternal(dsaWithSHA1_PKIX_data);
 
+        // Android-removed: Parsing mapping as OID even if "OID." prefix isn't specified
+        //nameTable = new HashMap<ObjectIdentifier,String>();
         nameTable.put(MD5_oid, "MD5");
         nameTable.put(MD2_oid, "MD2");
         nameTable.put(SHA_oid, "SHA-1");
diff --git a/ojluni/src/main/java/sun/security/x509/OIDMap.java b/ojluni/src/main/java/sun/security/x509/OIDMap.java
index 9eed0f2..0e3ae16 100644
--- a/ojluni/src/main/java/sun/security/x509/OIDMap.java
+++ b/ojluni/src/main/java/sun/security/x509/OIDMap.java
@@ -112,6 +112,8 @@
     /** Map String(friendly name) -> OIDInfo(info) */
     private final static Map<String,OIDInfo> nameMap;
 
+    // BEGIN Android-changed: Specify Class objects rather for oidMap rather than String
+    // literals + reflection.
     static {
         oidMap = new HashMap<ObjectIdentifier,OIDInfo>();
         nameMap = new HashMap<String,OIDInfo>();
@@ -200,6 +202,8 @@
             return clazz;
         }
     }
+    // END Android-changed: Specify Class objects rather for oidMap rather than String
+    // literals + reflection.
 
     /**
      * Add a name to lookup table.
diff --git a/ojluni/src/main/java/sun/security/x509/RDN.java b/ojluni/src/main/java/sun/security/x509/RDN.java
index 5a4c243..3bfc524 100644
--- a/ojluni/src/main/java/sun/security/x509/RDN.java
+++ b/ojluni/src/main/java/sun/security/x509/RDN.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 The Android Open Source Project
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -478,11 +478,11 @@
      * AVA's containing a standard keyword are ordered alphabetically,
      * followed by AVA's containing an OID keyword, ordered numerically
      */
-    @Override
     public int compare(AVA a1, AVA a2) {
         boolean a1Has2253 = a1.hasRFC2253Keyword();
         boolean a2Has2253 = a2.hasRFC2253Keyword();
 
+        // BEGIN Android-changed: Keep sort order of RDN from Android M
         if (a1Has2253) {
             if (a2Has2253) {
                 return a1.toRFC2253CanonicalString().compareTo
@@ -506,6 +506,7 @@
                         a1Oid[pos] - a2Oid[pos];
             }
         }
+        // BEGIN Android-changed: Keep sort order of RDN from prev impl
     }
 
 }
diff --git a/ojluni/src/main/java/sun/security/x509/X500Name.java b/ojluni/src/main/java/sun/security/x509/X500Name.java
index 166ce3c..e708837 100644
--- a/ojluni/src/main/java/sun/security/x509/X500Name.java
+++ b/ojluni/src/main/java/sun/security/x509/X500Name.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 The Android Open Source Project
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -876,6 +876,7 @@
             return;
         }
 
+        // Android-added: refuse DN starting with new line or tab
         checkNoNewLinesNorTabsAtBeginningOfDN(input);
 
         List<RDN> dnVector = new ArrayList<>();
@@ -944,6 +945,7 @@
         names = dnVector.toArray(new RDN[dnVector.size()]);
     }
 
+    // BEGIN Android-added: refuse DN starting with new line or tab
     /**
      * Disallow new lines and tabs at the beginning of DN.
      *
@@ -960,6 +962,7 @@
             }
         }
     }
+    // END Android-added: refuse DN starting with new line or tab
 
     private void parseRFC2253DN(String dnString) throws IOException {
         if (dnString.length() == 0) {
@@ -1019,6 +1022,7 @@
     static int countQuotes(String string, int from, int to) {
         int count = 0;
 
+        // BEGIN Android-changed: Fix countQuotes in case of escaped backslashes: \\"
         int escape = 0;
         for (int i = from; i < to; i++) {
             if (string.charAt(i) == '"' && escape % 2 == 0) {
@@ -1026,6 +1030,7 @@
             }
             escape = (string.charAt(i) == '\\') ? escape + 1 : 0;
         }
+        // END Android-changed: Fix countQuotes in case of escaped backslashes: \\"
 
         return count;
     }
diff --git a/tools/docs/crypto/README b/tools/docs/crypto/README
index cc6b6eb..9a34b7f 100644
--- a/tools/docs/crypto/README
+++ b/tools/docs/crypto/README
@@ -2,7 +2,8 @@
 
 The central file is data/crypto_support.json, which is a JSON file that contains
 the supported API levels for each crypto algorithm that has ever been supported
-by Android.  The categories are identified as described in the JCA.
+by Android.  The categories are identified as described in the JCA, along with
+a couple extra classes.
 
 Each algorithm has up to three properties:
 
@@ -24,9 +25,8 @@
 
 Getting the set of supported algorithms is done using
 src/java/libcore/java/security/ListProviders.java.  It's important that this is
-run using vogar (in mode=device, the default) rather than in an app container,
-as this documentation only includes the libcore-supported crypto support, but
-the Android frameworks (in particular, Android KeyStore) can add additional
+run using vogar in mode=activity rather than the default of mode=device, as
+the Android frameworks (in particular, Android Keystore) can add additional
 support.
 
 The data from ListProviders is fed into update_crypto_support.py, which rewrites
@@ -38,4 +38,5 @@
 
 Finally, format_supported_algorithm_table.py reads the data file and outputs
 a collection of HTML tables suitable for copying-and-pasting into the docs
-to stdout.
+to stdout.  Add --javadoc to produce output appropriate for inclusion in
+Javadoc.
diff --git a/tools/docs/crypto/crypto_docs.py b/tools/docs/crypto/crypto_docs.py
index d1f220d..482e38e 100644
--- a/tools/docs/crypto/crypto_docs.py
+++ b/tools/docs/crypto/crypto_docs.py
@@ -29,3 +29,11 @@
     data = json.loads(stripped_contents)
     f.close()
     return data
+
+
+def find_by_name(seq, name):
+    """Returns the first element in seq with the given name."""
+    for item in seq:
+        if item['name'] == name:
+            return item
+    return None
diff --git a/tools/docs/crypto/data/crypto_support.json b/tools/docs/crypto/data/crypto_support.json
index 38834d9..124a457 100644
--- a/tools/docs/crypto/data/crypto_support.json
+++ b/tools/docs/crypto/data/crypto_support.json
@@ -887,6 +887,1500 @@
     {
       "algorithms": [
         {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "9-23"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-23"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-23"
+        },
+        {
+          "name": "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+          "supported_api_levels": "20+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": ""
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        }
+      ],
+      "name": "SSLEngine.Enabled"
+    },
+    {
+      "algorithms": [
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "name": "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_NULL_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_NULL_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_NULL_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_RC4_128_SHA",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "name": "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_FALLBACK_SCSV",
+          "supported_api_levels": "21+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_NULL_WITH_NULL_NULL",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "21-22"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_RC4_128_SHA",
+          "supported_api_levels": "21-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_NULL_MD5",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "1-8"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_NULL_SHA256",
+          "supported_api_levels": "20-22"
+        }
+      ],
+      "name": "SSLEngine.Supported"
+    },
+    {
+      "algorithms": [
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "9-23"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-23"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-23"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-19"
+        },
+        {
+          "name": "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+          "supported_api_levels": "11+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": ""
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        }
+      ],
+      "name": "SSLSocket.Enabled"
+    },
+    {
+      "algorithms": [
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_DH_anon_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "name": "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_DES_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_NULL_MD5",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_MD5",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "SSL_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_DH_anon_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-25"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+          "supported_api_levels": "24+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-25"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_NULL_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_NULL_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_RSA_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_NULL_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_ECDH_anon_WITH_RC4_128_SHA",
+          "supported_api_levels": "11-22"
+        },
+        {
+          "name": "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+          "supported_api_levels": "11+"
+        },
+        {
+          "name": "TLS_FALLBACK_SCSV",
+          "supported_api_levels": "21+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_3DES_EDE_CBC_SHA",
+          "supported_api_levels": "21-22"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "name": "TLS_PSK_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "21+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_PSK_WITH_RC4_128_SHA",
+          "supported_api_levels": "21-25"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_128_GCM_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA",
+          "supported_api_levels": "9+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_CBC_SHA256",
+          "supported_api_levels": "20+"
+        },
+        {
+          "name": "TLS_RSA_WITH_AES_256_GCM_SHA384",
+          "supported_api_levels": "20+"
+        },
+        {
+          "deprecated": "true",
+          "name": "TLS_RSA_WITH_NULL_SHA256",
+          "supported_api_levels": "20-22"
+        }
+      ],
+      "name": "SSLSocket.Supported"
+    },
+    {
+      "algorithms": [
+        {
           "name": "AES",
           "supported_api_levels": "23+"
         },
@@ -1227,5 +2721,5 @@
       "name": "TrustManagerFactory"
     }
   ],
-  "last_updated": "2017-03-21 16:04:30 UTC"
+  "last_updated": "2017-05-05 07:40:17 UTC"
 }
\ No newline at end of file
diff --git a/tools/docs/crypto/format_supported_algorithm_table.py b/tools/docs/crypto/format_supported_algorithm_table.py
index 3b23066..5a6dd15 100755
--- a/tools/docs/crypto/format_supported_algorithm_table.py
+++ b/tools/docs/crypto/format_supported_algorithm_table.py
@@ -26,6 +26,9 @@
 import crypto_docs
 
 
+find_by_name = crypto_docs.find_by_name
+
+
 def sort_by_name(seq):
     return sorted(seq, key=lambda x: x['name'])
 
@@ -46,10 +49,14 @@
     output.append('')
     output.append('<ul>')
     for category in categories:
-        output.append('  <li><a href="#Supported{name}">'
-               '<code>{name}</code></a></li>'.format(**category))
+        if not category['name'].endswith('.Enabled'):
+            output.append('  <li><a href="#Supported{name}">'
+                   '<code>{name}</code></a></li>'.format(**category))
     output.append('</ul>')
     for category in categories:
+        if category['name'].endswith('.Enabled'):
+            # These are handled in the "Supported" section below
+            continue
         if category['name'] == 'Cipher':
             # We display ciphers in a four-column table to conserve space and
             # so that it's more comprehensible.  To do this, we have to
@@ -155,6 +162,39 @@
                 i += 1
             output.append('  </tbody>')
             output.append('</table>')
+        elif category['name'].endswith('.Supported'):
+            # Some categories come with a "Supported" and "Enabled" list, and we
+            # group those together in one table for display.  Every entry that's enabled
+            # must be supported, so we can just look up the enabled version for each
+            # supported item
+            basename = category['name'][:-len('.Supported')]
+            supported = sort_by_name(category['algorithms'])
+            enabled = sort_by_name(find_by_name(categories, basename + '.Enabled')['algorithms'])
+            output.append('<h3 id="Supported{0}">{0}</h3>'.format(basename))
+            output.append('<table>')
+            output.append('  <thead>')
+            output.append('    <tr>')
+            output.append('      <th>Algorithm</th>')
+            output.append('      <th>Supported API Levels</th>')
+            output.append('      <th>Enabled By Default</th>')
+            output.append('    </tr>')
+            output.append('  </thead>')
+            output.append('  <tbody>')
+            for algorithm in supported:
+                if 'deprecated' in algorithm and algorithm['deprecated']:
+                    output.append('    <tr class="deprecated">')
+                else:
+                    output.append('    <tr>')
+                output.append('      <td>{name}</td>'.format(**algorithm))
+                output.append('      <td>{supported_api_levels}</td>'.format(**algorithm))
+                enabled_alg = find_by_name(enabled, algorithm['name'])
+                if enabled_alg is None:
+                    output.append('      <td></td>')
+                else:
+                    output.append('      <td>{supported_api_levels}</td>'.format(**enabled_alg))
+                output.append('    </tr>')
+            output.append('  </tbody>')
+            output.append('</table>')
         else:
             output.append('<h3 id="Supported{name}">{name}</h3>'.format(**category))
             output.append('<table>')
diff --git a/tools/docs/crypto/run_update_crypto_support.sh b/tools/docs/crypto/run_update_crypto_support.sh
index 5908fcc..501891c 100755
--- a/tools/docs/crypto/run_update_crypto_support.sh
+++ b/tools/docs/crypto/run_update_crypto_support.sh
@@ -13,5 +13,5 @@
   exit 1
 fi
 
-make -j48 vogar
+make -j48 vogar dx
 vogar --mode=activity --toolchain=jdk --multidex=false libcore/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java | libcore/tools/docs/crypto/update_crypto_support.py --api_level=$1 --rewrite_file libcore/tools/docs/crypto/data/crypto_support.json
diff --git a/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java b/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java
index 1cd86467..ab25382 100644
--- a/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java
+++ b/tools/docs/crypto/src/java/libcore/java/security/ListProviders.java
@@ -16,18 +16,22 @@
 
 package libcore.java.security;
 
+import android.net.PskKeyManager;
+
 import java.security.NoSuchAlgorithmException;
 import java.security.Provider;
 import java.security.Security;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
 import javax.crypto.Cipher;
 import javax.crypto.NoSuchPaddingException;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
 
 /**
  * Prints a list of all algorithms provided by security providers.  Intended to be run
@@ -81,7 +85,7 @@
         System.out.println((SHOW_PROVIDER ? p.getName() + ": " : "") + type + " " + algorithm);
     }
 
-    public static void main(String[] argv) {
+    public static void main(String[] argv) throws Exception {
         System.out.println("BEGIN ALGORITHM LIST");
         for (Provider p : Security.getProviders()) {
             Set<Provider.Service> services = new TreeSet<Provider.Service>(
@@ -126,6 +130,31 @@
                 }
             }
         }
+        // SSLEngine and SSLSocket algorithms are handled outside the default provider system
+        SSLContext defaultContext = SSLContext.getDefault();
+        // PSK cipher suites are only enabled when a PskKeyManager is available, but some other
+        // suites are disabled in that case, so check for both
+        SSLContext pskContext = SSLContext.getInstance("TLS");
+        pskContext.init(
+                new KeyManager[] {new PskKeyManager(){}},
+                new TrustManager[0],
+                null);
+        for (SSLContext sslContext : new SSLContext[] {defaultContext, pskContext}) {
+            SSLEngine engine = sslContext.createSSLEngine();
+            for (String suite : engine.getSupportedCipherSuites()) {
+                print(sslContext.getProvider(), "SSLEngine.Supported", suite);
+            }
+            for (String suite : engine.getEnabledCipherSuites()) {
+                print(sslContext.getProvider(), "SSLEngine.Enabled", suite);
+            }
+            SSLSocketFactory socketFactory = sslContext.getSocketFactory();
+            for (String suite : socketFactory.getSupportedCipherSuites()) {
+                print(sslContext.getProvider(), "SSLSocket.Supported", suite);
+            }
+            for (String suite : socketFactory.getDefaultCipherSuites()) {
+                print(sslContext.getProvider(), "SSLSocket.Enabled", suite);
+            }
+        }
         System.out.println("END ALGORITHM LIST");
     }
 }
\ No newline at end of file
diff --git a/tools/docs/crypto/update_crypto_support.py b/tools/docs/crypto/update_crypto_support.py
index 207e0f4..3138d7d 100755
--- a/tools/docs/crypto/update_crypto_support.py
+++ b/tools/docs/crypto/update_crypto_support.py
@@ -51,16 +51,24 @@
     'SecureRandom',
     'Signature',
     'SSLContext',
+    'SSLEngine.Enabled',
+    'SSLEngine.Supported',
+    'SSLSocket.Enabled',
+    'SSLSocket.Supported',
     'TrustManagerFactory',
 ]
 
+# For these categories, we really want to maintain the casing that was in the
+# original data, so avoid changing it.
+CASE_SENSITIVE_CATEGORIES = [
+    'SSLEngine.Enabled',
+    'SSLEngine.Supported',
+    'SSLSocket.Enabled',
+    'SSLSocket.Supported',
+]
 
-def find_by_name(seq, name):
-    """Returns the first element in seq with the given name."""
-    for item in seq:
-        if item['name'] == name:
-            return item
-    return None
+
+find_by_name = crypto_docs.find_by_name
 
 
 def find_by_normalized_name(seq, name):
@@ -193,7 +201,8 @@
                 new_algorithm = {'name': prev_alg['name']}
             else:
                 new_algorithm = {'name': alg}
-            new_algorithm['name'] = fix_name_caps_for_output(new_algorithm['name'])
+            if category not in CASE_SENSITIVE_CATEGORIES:
+                new_algorithm['name'] = fix_name_caps_for_output(new_algorithm['name'])
             new_level = None
             if alg in current_category and alg in prev_algorithms:
                 # Both old and new have it, just ensure the API level is right
diff --git a/tzdata/prototype_data/Android.mk b/tzdata/prototype_data/Android.mk
new file mode 100644
index 0000000..568bbaf
--- /dev/null
+++ b/tzdata/prototype_data/Android.mk
@@ -0,0 +1,34 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_PACKAGE_NAME := PrototypeTimeZoneDataApp
+LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_PACKAGE_NAME := PrototypeTimeZoneDataApp_data
+LOCAL_CERTIFICATE := platform
+# Needed to ensure the .apk can be installed. Without it the .apk is missing a .dex.
+LOCAL_DEX_PREOPT := false
+include $(BUILD_PACKAGE)
diff --git a/tzdata/prototype_data/AndroidManifest.xml b/tzdata/prototype_data/AndroidManifest.xml
new file mode 100644
index 0000000..ae0fe6b
--- /dev/null
+++ b/tzdata/prototype_data/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="libcore.tzdata.prototype_data"
+          android:versionCode="1">
+
+    <application
+        android:allowBackup="false"
+        android:label="@string/app_name">
+
+        <provider
+                android:name="libcore.tzdata.prototypedata.TimeZoneRulesDataProvider"
+                android:authorities="com.android.timezone"
+                android:grantUriPermissions="true"
+                android:readPermission="android.permission.UPDATE_TIME_ZONE_RULES"
+                android:exported="true">
+            <meta-data android:name="android.timezoneprovider.OPERATION"
+                     android:value="INSTALL"/>
+            <meta-data android:name="android.timezoneprovider.DATA_ASSET"
+                     android:value="test_2030a.zip"/>
+            <meta-data android:name="android.timezoneprovider.DISTRO_MAJOR_VERSION"
+                     android:value="1"/>
+            <meta-data android:name="android.timezoneprovider.DISTRO_MINOR_VERSION"
+                     android:value="1"/>
+            <meta-data android:name="android.timezoneprovider.RULES_VERSION"
+                     android:value="2030a"/>
+            <meta-data android:name="android.timezoneprovider.REVISION"
+                     android:value="1"/>
+        </provider>
+    </application>
+</manifest>
diff --git a/tzdata/prototype_data/assets/test_2030a.zip b/tzdata/prototype_data/assets/test_2030a.zip
new file mode 100644
index 0000000..ae274cd
--- /dev/null
+++ b/tzdata/prototype_data/assets/test_2030a.zip
Binary files differ
diff --git a/tzdata/prototype_data/res/values/strings.xml b/tzdata/prototype_data/res/values/strings.xml
new file mode 100644
index 0000000..e25341c
--- /dev/null
+++ b/tzdata/prototype_data/res/values/strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<resources>
+    <string name="app_name">DataPrototypeApp</string>
+</resources>
diff --git a/tzdata/prototype_data/src/libcore/tzdata/prototypedata/TimeZoneRulesDataProvider.java b/tzdata/prototype_data/src/libcore/tzdata/prototypedata/TimeZoneRulesDataProvider.java
new file mode 100644
index 0000000..c7be72a
--- /dev/null
+++ b/tzdata/prototype_data/src/libcore/tzdata/prototypedata/TimeZoneRulesDataProvider.java
@@ -0,0 +1,352 @@
+/*
+ * Copyright (C) 2017 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.tzdata.prototypedata;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.ProviderInfo;
+import android.database.AbstractCursor;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.ParcelFileDescriptor;
+import android.provider.TimeZoneRulesDataContract;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import libcore.io.Streams;
+
+import static android.content.res.AssetManager.ACCESS_STREAMING;
+import static android.provider.TimeZoneRulesDataContract.COLUMN_DISTRO_MAJOR_VERSION;
+import static android.provider.TimeZoneRulesDataContract.COLUMN_DISTRO_MINOR_VERSION;
+import static android.provider.TimeZoneRulesDataContract.COLUMN_OPERATION;
+import static android.provider.TimeZoneRulesDataContract.COLUMN_REVISION;
+import static android.provider.TimeZoneRulesDataContract.COLUMN_RULES_VERSION;
+import static android.provider.TimeZoneRulesDataContract.OPERATION_INSTALL;
+
+/**
+ * A basic implementation of a time zone data provider that can be used by OEMs to implement
+ * an APK asset-based solution for time zone updates.
+ */
+public final class TimeZoneRulesDataProvider extends ContentProvider {
+
+    static final String TAG = "TimeZoneRulesDataProvider";
+
+    private static final String METADATA_KEY_OPERATION = "android.timezoneprovider.OPERATION";
+    private static final String METADATA_KEY_ASSET = "android.timezoneprovider.DATA_ASSET";
+    private static final String METADATA_KEY_DISTRO_MAJOR_VERSION
+            = "android.timezoneprovider.DISTRO_MAJOR_VERSION";
+    private static final String METADATA_KEY_DISTRO_MINOR_VERSION
+            = "android.timezoneprovider.DISTRO_MINOR_VERSION";
+    private static final String METADATA_KEY_RULES_VERSION
+            = "android.timezoneprovider.RULES_VERSION";
+    private static final String METADATA_KEY_REVISION
+            = "android.timezoneprovider.REVISION";
+
+    private static final Set<String> KNOWN_COLUMN_NAMES;
+    private static final Map<String, Class<?>> KNOWN_COLUMN_TYPES;
+    static {
+        Set<String> columnNames = new HashSet<>();
+        columnNames.add(COLUMN_OPERATION);
+        columnNames.add(COLUMN_DISTRO_MAJOR_VERSION);
+        columnNames.add(COLUMN_DISTRO_MINOR_VERSION);
+        columnNames.add(COLUMN_RULES_VERSION);
+        columnNames.add(COLUMN_REVISION);
+        KNOWN_COLUMN_NAMES = Collections.unmodifiableSet(columnNames);
+
+        Map<String, Class<?>> columnTypes = new HashMap<>();
+        columnTypes.put(COLUMN_OPERATION, String.class);
+        columnTypes.put(COLUMN_DISTRO_MAJOR_VERSION, Integer.class);
+        columnTypes.put(COLUMN_DISTRO_MINOR_VERSION, Integer.class);
+        columnTypes.put(COLUMN_RULES_VERSION, String.class);
+        columnTypes.put(COLUMN_REVISION, Integer.class);
+        KNOWN_COLUMN_TYPES = Collections.unmodifiableMap(columnTypes);
+    }
+
+    private Map<String, Object> mColumnData = new HashMap<>();
+    private String mAssetName;
+
+    @Override
+    public boolean onCreate() {
+        return true;
+    }
+
+    @Override
+    public void attachInfo(Context context, ProviderInfo info) {
+        super.attachInfo(context, info);
+
+        // Sanity check our security
+        if (!TimeZoneRulesDataContract.AUTHORITY.equals(info.authority)) {
+            // The authority looked for by the time zone updater is fixed.
+            throw new SecurityException(
+                    "android:authorities must be \"" + TimeZoneRulesDataContract.AUTHORITY + "\"");
+        }
+        if (!info.grantUriPermissions) {
+            throw new SecurityException("Provider must grant uri permissions");
+        }
+        if (!info.exported) {
+            // The content provider is accessed directly so must be exported.
+            throw new SecurityException("android:exported must be \"true\"");
+        }
+        if (info.pathPermissions != null || info.writePermission != null) {
+            // Use readPermission only to implement permissions.
+            throw new SecurityException("Use android:readPermission only");
+        }
+        if (!android.Manifest.permission.UPDATE_TIME_ZONE_RULES.equals(info.readPermission)) {
+            // Writing is not supported.
+            throw new SecurityException("android:readPermission must be set to \""
+                    + android.Manifest.permission.UPDATE_TIME_ZONE_RULES
+                    + "\" is: " + info.readPermission);
+        }
+
+        // info.metadata is not filled in by default. Must ask for it again.
+        final ProviderInfo infoWithMetadata = context.getPackageManager()
+                .resolveContentProvider(info.authority, PackageManager.GET_META_DATA);
+        Bundle metaData = infoWithMetadata.metaData;
+        if (metaData == null) {
+            throw new SecurityException("meta-data must be set");
+        }
+
+        String operation;
+        try {
+            operation = getMandatoryMetaDataString(metaData, METADATA_KEY_OPERATION);
+            mColumnData.put(COLUMN_OPERATION, operation);
+        } catch (IllegalArgumentException e) {
+            throw new SecurityException(METADATA_KEY_OPERATION + " meta-data not set.");
+        }
+        if (OPERATION_INSTALL.equals(operation)) {
+            mColumnData.put(
+                    COLUMN_DISTRO_MAJOR_VERSION,
+                    getMandatoryMetaDataInt(metaData, METADATA_KEY_DISTRO_MAJOR_VERSION));
+            mColumnData.put(
+                    COLUMN_DISTRO_MINOR_VERSION,
+                    getMandatoryMetaDataInt(metaData, METADATA_KEY_DISTRO_MINOR_VERSION));
+            mColumnData.put(
+                    COLUMN_RULES_VERSION,
+                    getMandatoryMetaDataString(metaData, METADATA_KEY_RULES_VERSION));
+            mColumnData.put(
+                    COLUMN_REVISION,
+                    getMandatoryMetaDataInt(metaData, METADATA_KEY_REVISION));
+
+            // Make sure the asset containing the data to install exists.
+            String assetName = getMandatoryMetaDataString(metaData, METADATA_KEY_ASSET);
+            try {
+                InputStream is = context.getAssets().open(assetName);
+                // An exception is thrown if the asset does not exist. list(assetName) appears not
+                // to work with file paths.
+                is.close();
+            } catch (IOException e) {
+                throw new SecurityException("Unable to open asset:" + assetName);
+            }
+            mAssetName = assetName;
+        }
+    }
+
+    @Override
+    public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection,
+            @Nullable String[] selectionArgs, @Nullable String sortOrder) {
+        if (!TimeZoneRulesDataContract.OPERATION_URI.equals(uri)) {
+            return null;
+        }
+        final List<String> projectionList = Arrays.asList(projection);
+        if (projection != null && !KNOWN_COLUMN_NAMES.containsAll(projectionList)) {
+            throw new UnsupportedOperationException(
+                    "Only " + KNOWN_COLUMN_NAMES + " columns supported.");
+        }
+
+        return new AbstractCursor() {
+            @Override
+            public int getCount() {
+                return 1;
+            }
+
+            @Override
+            public String[] getColumnNames() {
+                return projectionList.toArray(new String[0]);
+            }
+
+            @Override
+            public int getType(int column) {
+                String columnName = projectionList.get(column);
+                Class<?> columnJavaType = KNOWN_COLUMN_TYPES.get(columnName);
+                if (columnJavaType == String.class) {
+                    return Cursor.FIELD_TYPE_STRING;
+                } else if (columnJavaType == Integer.class) {
+                    return Cursor.FIELD_TYPE_INTEGER;
+                } else {
+                    throw new UnsupportedOperationException(
+                            "Unsupported type: " + columnJavaType + " for " + columnName);
+                }
+            }
+
+            @Override
+            public String getString(int column) {
+                checkPosition();
+                String columnName = projectionList.get(column);
+                if (KNOWN_COLUMN_TYPES.get(columnName) != String.class) {
+                    throw new UnsupportedOperationException();
+                }
+                return (String) mColumnData.get(columnName);
+            }
+
+            @Override
+            public short getShort(int column) {
+                checkPosition();
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public int getInt(int column) {
+                checkPosition();
+                String columnName = projectionList.get(column);
+                if (KNOWN_COLUMN_TYPES.get(columnName) != Integer.class) {
+                    throw new UnsupportedOperationException();
+                }
+                return (Integer) mColumnData.get(columnName);
+            }
+
+            @Override
+            public long getLong(int column) {
+                return getInt(column);
+            }
+
+            @Override
+            public float getFloat(int column) {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public double getDouble(int column) {
+                checkPosition();
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public boolean isNull(int column) {
+                checkPosition();
+                return column != 0;
+            }
+        };
+    }
+
+    @Override
+    public ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode)
+            throws FileNotFoundException {
+        if (!TimeZoneRulesDataContract.DATA_URI.equals(uri)) {
+            return null;
+        }
+        if (mAssetName == null) {
+            throw new FileNotFoundException();
+        }
+        if (!mode.equals("r")) {
+            throw new SecurityException("Only read-only access supported.");
+        }
+
+        // Extract the asset to a local dir. We do it every time: we don't make assumptions that the
+        // current copy (if any) is valid.
+        File localFile = extractAssetToLocalFile();
+
+        // Create a read-only ParcelFileDescriptor that can be passed to the caller process.
+        try {
+            return ParcelFileDescriptor.open(localFile, ParcelFileDescriptor.MODE_READ_ONLY,
+                    new Handler(Looper.getMainLooper()),
+                    e -> {
+                        if (e != null) {
+                            Log.w(TAG, "Error in OnCloseListener for " + localFile, e);
+                        }
+                        localFile.delete();
+                    });
+        } catch (IOException e) {
+            throw new RuntimeException("Unable to open asset file", e);
+        }
+    }
+
+    private File extractAssetToLocalFile() throws FileNotFoundException {
+        File extractedFile = new File(getContext().getFilesDir(), "timezone_data.zip");
+        InputStream is;
+        try {
+            is = getContext().getAssets().open(mAssetName, ACCESS_STREAMING);
+        } catch (FileNotFoundException e) {
+            throw e;
+        } catch (IOException e) {
+            FileNotFoundException fnfe = new FileNotFoundException("Problem reading asset");
+            fnfe.initCause(e);
+            throw fnfe;
+        }
+
+        try (InputStream fis = is;
+                FileOutputStream fos = new FileOutputStream(extractedFile, false /* append */)) {
+            Streams.copy(fis, fos);
+        } catch (IOException e) {
+            throw new RuntimeException("Unable to create asset storage file: " + extractedFile, e);
+        }
+        return extractedFile;
+    }
+
+    @Override
+    public String getType(@NonNull Uri uri) {
+        return null;
+    }
+
+    @Override
+    public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int delete(@NonNull Uri uri, @Nullable String selection,
+            @Nullable String[] selectionArgs) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection,
+            @Nullable String[] selectionArgs) {
+        throw new UnsupportedOperationException();
+    }
+
+    private static String getMandatoryMetaDataString(Bundle metaData, String key) {
+        if (!metaData.containsKey(key)) {
+            throw new SecurityException("No metadata with key " + key + " found.");
+        }
+        return metaData.getString(key);
+    }
+
+    private static int getMandatoryMetaDataInt(Bundle metaData, String key) {
+        if (!metaData.containsKey(key)) {
+            throw new SecurityException("No metadata with key " + key + " found.");
+        }
+        return metaData.getInt(key, -1);
+    }
+}
diff --git a/tzdata/prototype_updater/Android.mk b/tzdata/prototype_updater/Android.mk
new file mode 100644
index 0000000..0ddaa45
--- /dev/null
+++ b/tzdata/prototype_updater/Android.mk
@@ -0,0 +1,24 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_PACKAGE_NAME := PrototypeTimeZoneUpdaterApp
+LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
+include $(BUILD_PACKAGE)
diff --git a/tzdata/prototype_updater/AndroidManifest.xml b/tzdata/prototype_updater/AndroidManifest.xml
new file mode 100644
index 0000000..9b73b0b
--- /dev/null
+++ b/tzdata/prototype_updater/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="libcore.tzdata.prototype_updater"
+    android:versionCode="1">
+
+    <uses-permission android:name="android.permission.UPDATE_TIME_ZONE_RULES" />
+
+    <application
+        android:allowBackup="false"
+        android:label="@string/app_name">
+
+        <receiver android:name=".RulesCheckReceiver"
+                android:permission="android.permission.TRIGGER_TIME_ZONE_RULES_CHECK"
+                android:exported="true">
+            <intent-filter>
+                <action android:name="android.intent.action.timezone.TRIGGER_RULES_UPDATE_CHECK" />
+            </intent-filter>
+        </receiver>
+
+    </application>
+
+</manifest>
diff --git a/tzdata/prototype_updater/res/values/strings.xml b/tzdata/prototype_updater/res/values/strings.xml
new file mode 100644
index 0000000..204ae27
--- /dev/null
+++ b/tzdata/prototype_updater/res/values/strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<resources>
+    <string name="app_name">PrototypeUpdaterApp</string>
+</resources>
diff --git a/tzdata/prototype_updater/src/libcore/tzdata/prototype_updater/RulesCheckReceiver.java b/tzdata/prototype_updater/src/libcore/tzdata/prototype_updater/RulesCheckReceiver.java
new file mode 100644
index 0000000..9f3a3b8
--- /dev/null
+++ b/tzdata/prototype_updater/src/libcore/tzdata/prototype_updater/RulesCheckReceiver.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2017 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.tzdata.prototype_updater;
+
+import android.app.timezone.Callback;
+import android.app.timezone.DistroFormatVersion;
+import android.app.timezone.DistroRulesVersion;
+import android.app.timezone.RulesManager;
+import android.app.timezone.RulesState;
+import android.app.timezone.RulesUpdaterContract;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.ParcelFileDescriptor;
+import android.provider.TimeZoneRulesDataContract;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import libcore.io.Streams;
+
+// TODO(nfuller): Prevent multiple broadcasts being handled at once?
+// TODO(nfuller): Improve logging
+// TODO(nfuller): Make the rules check async?
+// TODO(nfuller): Need async generally for SystemService calls from BroadcastReceiver?
+public class RulesCheckReceiver extends BroadcastReceiver {
+    final static String TAG = "RulesCheckReceiver";
+
+    private RulesManager mRulesManager;
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        if (!RulesUpdaterContract.ACTION_TRIGGER_RULES_UPDATE_CHECK.equals(intent.getAction())) {
+            // Unknown. Do nothing.
+            Log.w(TAG, "Unrecognized intent action received: " + intent
+                    + ", action=" + intent.getAction());
+            return;
+        }
+
+        mRulesManager = (RulesManager) context.getSystemService("timezone");
+
+        byte[] token = intent.getByteArrayExtra(RulesUpdaterContract.EXTRA_CHECK_TOKEN);
+
+        // Note: We rely on the system server to check that the configured data application is the
+        // one that exposes the content provider with the well-known authority, and is a privileged
+        // application as required. It is *not* checked here and it is assumed the updater can trust
+        // the data application.
+
+        // Obtain the information about what the data app is telling us to do.
+        String operation = getOperation(context);
+        if (operation == null) {
+            // TODO Log
+            boolean success = true; // No point in retrying.
+            handleCheckComplete(token, success);
+            return;
+        }
+        switch (operation) {
+            case TimeZoneRulesDataContract.OPERATION_NO_OP:
+                // TODO Log
+                // No-op. Just acknowledge the check.
+                handleCheckComplete(token, true /* success */);
+                break;
+            case TimeZoneRulesDataContract.OPERATION_UNINSTALL:
+                // TODO Log
+                handleUninstall(token);
+                break;
+            case TimeZoneRulesDataContract.OPERATION_INSTALL:
+                // TODO Log
+                DistroVersionInfo distroVersionInfo = getDistroVersionInfo(context);
+                handleCopyAndInstall(context, token, distroVersionInfo);
+                break;
+            default:
+                // TODO Log
+                final boolean success = true; // No point in retrying.
+                handleCheckComplete(token, success);
+        }
+    }
+
+    private String getOperation(Context context) {
+        Cursor cursor = context.getContentResolver()
+                .query(TimeZoneRulesDataContract.OPERATION_URI,
+                        new String[] { TimeZoneRulesDataContract.COLUMN_OPERATION },
+                        null /* selection */, null /* selectionArgs */, null /* sortOrder */);
+        if (cursor == null) {
+            Log.e(TAG, "getOperation: query returned null");
+            return null;
+        }
+        if (!cursor.moveToFirst()) {
+            Log.e(TAG, "getOperation: query returned empty results");
+            return null;
+        }
+
+        try {
+            return cursor.getString(0);
+        } catch (Exception e) {
+            Log.e(TAG, "getOperation: getString() threw an exception", e);
+            return null;
+        }
+    }
+
+    private DistroVersionInfo getDistroVersionInfo(Context context) {
+        Cursor cursor = context.getContentResolver()
+                .query(TimeZoneRulesDataContract.OPERATION_URI,
+                        new String[] {
+                                TimeZoneRulesDataContract.COLUMN_DISTRO_MAJOR_VERSION,
+                                TimeZoneRulesDataContract.COLUMN_DISTRO_MINOR_VERSION,
+                                TimeZoneRulesDataContract.COLUMN_RULES_VERSION,
+                                TimeZoneRulesDataContract.COLUMN_REVISION},
+                        null /* selection */, null /* selectionArgs */, null /* sortOrder */);
+        if (cursor == null) {
+            Log.e(TAG, "getDistroVersionInfo: query returned null");
+            return null;
+        }
+        if (!cursor.moveToFirst()) {
+            Log.e(TAG, "getDistroVersionInfo: query returned empty results");
+            return null;
+        }
+
+        try {
+            return new DistroVersionInfo(
+                    cursor.getInt(0),
+                    cursor.getInt(1),
+                    cursor.getString(2),
+                    cursor.getInt(3));
+        } catch (Exception e) {
+            Log.e(TAG, "getDistroVersionInfo: getInt()/getString() threw an exception", e);
+            return null;
+        }
+    }
+
+    private void handleCopyAndInstall(Context context, byte[] checkToken,
+            DistroVersionInfo distroVersionInfo) {
+
+        // Decide whether to proceed with the install.
+        RulesState rulesState = mRulesManager.getRulesState();
+        if (!(rulesState.isDistroFormatVersionSupported(distroVersionInfo.mDistroFormatVersion)
+            && rulesState.isSystemVersionOlderThan(distroVersionInfo.mDistroRulesVersion))) {
+            // Nothing to do.
+            handleCheckComplete(checkToken, true /* success */);
+            return;
+        }
+
+        // Copy the data locally before passing it on....security and whatnot.
+        // TODO(nfuller): Need to do the copy here?
+        File file = copyDataToLocalFile(context);
+        if (file == null) {
+            // It's possible this may get better if the problem is related to storage space.
+            boolean success = false;
+            handleCheckComplete(checkToken, success);
+            return;
+        }
+        handleInstall(checkToken, file);
+    }
+
+    private static File copyDataToLocalFile(Context context) {
+        File extractedFile = new File(context.getFilesDir(), "temp.zip");
+        ParcelFileDescriptor fileDescriptor;
+        try {
+            fileDescriptor = context.getContentResolver().openFileDescriptor(
+                    TimeZoneRulesDataContract.DATA_URI, "r");
+            if (fileDescriptor == null) {
+                throw new FileNotFoundException("ContentProvider returned null");
+            }
+        } catch (FileNotFoundException e) {
+            Log.e(TAG, "copyDataToLocalFile: Unable to open file descriptor"
+                    + TimeZoneRulesDataContract.DATA_URI, e);
+            return null;
+        }
+
+        try (ParcelFileDescriptor pfd = fileDescriptor;
+             InputStream fis = new FileInputStream(pfd.getFileDescriptor());
+             FileOutputStream fos = new FileOutputStream(extractedFile, false /* append */)) {
+            Streams.copy(fis, fos);
+        } catch (IOException e) {
+            Log.e(TAG, "Unable to create asset storage file: " + extractedFile, e);
+            return null;
+        }
+        return extractedFile;
+    }
+
+    private void handleInstall(final byte[] checkToken, final File contentFile) {
+        // Convert the distroFile to a ParcelFileDescriptor.
+        final ParcelFileDescriptor distroFileDescriptor;
+        try {
+            distroFileDescriptor =
+                    ParcelFileDescriptor.open(contentFile, ParcelFileDescriptor.MODE_READ_ONLY);
+        } catch (FileNotFoundException e) {
+            Log.e(TAG, "Unable to create ParcelFileDescriptor from " + contentFile);
+            handleCheckComplete(checkToken, false /* success */);
+            return;
+        }
+
+        Callback callback = new Callback() {
+            @Override
+            public void onFinished(int status) {
+                Log.i(TAG, "onFinished: Finished install: " + status);
+
+                // TODO(nfuller): Can this be closed sooner?
+                try {
+                    distroFileDescriptor.close();
+                } catch (IOException e) {
+                    Log.e(TAG, "Unable to close ParcelFileDescriptor for " + contentFile, e);
+                } finally {
+                    // Delete the file we no longer need.
+                    contentFile.delete();
+                }
+            }
+        };
+
+        try {
+            int requestStatus =
+                    mRulesManager.requestInstall(distroFileDescriptor, checkToken, callback);
+            Log.i(TAG, "handleInstall: Request sent:" + requestStatus);
+        } catch (Exception e) {
+            Log.e(TAG, "handleInstall: Error", e);
+        }
+    }
+
+    private void handleUninstall(byte[] checkToken) {
+        Callback callback = new Callback() {
+            @Override
+            public void onFinished(int status) {
+                Log.i(TAG, "onFinished: Finished uninstall: " + status);
+            }
+        };
+
+        try {
+            int requestStatus =
+                    mRulesManager.requestUninstall(checkToken, callback);
+            Log.i(TAG, "handleUninstall: Request sent" + requestStatus);
+        } catch (Exception e) {
+            Log.e(TAG, "handleUninstall: Error", e);
+        }
+    }
+
+    private void handleCheckComplete(final byte[] token, final boolean success) {
+        try {
+            mRulesManager.requestNothing(token, success);
+            Log.i(TAG, "doInBackground: Called checkComplete: token="
+                    + Arrays.toString(token) + ", success=" + success);
+        } catch (Exception e) {
+            Log.e(TAG, "doInBackground: Error calling checkComplete()", e);
+        }
+    }
+
+    private static class DistroVersionInfo {
+
+        final DistroFormatVersion mDistroFormatVersion;
+        final DistroRulesVersion mDistroRulesVersion;
+
+        DistroVersionInfo(int distroMajorVersion, int distroMinorVersion,
+                String rulesVersion, int revision) {
+            mDistroFormatVersion = new DistroFormatVersion(distroMajorVersion, distroMinorVersion);
+            mDistroRulesVersion = new DistroRulesVersion(rulesVersion, revision);
+        }
+    }
+}
diff --git a/tzdata/update_test_app2/Android.mk b/tzdata/update_test_app2/Android.mk
new file mode 100644
index 0000000..c1ae636
--- /dev/null
+++ b/tzdata/update_test_app2/Android.mk
@@ -0,0 +1,25 @@
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_PACKAGE_NAME := UpdateTestApp2
+LOCAL_CERTIFICATE := platform
+include $(BUILD_PACKAGE)
diff --git a/tzdata/update_test_app2/AndroidManifest.xml b/tzdata/update_test_app2/AndroidManifest.xml
new file mode 100644
index 0000000..fd42bb5
--- /dev/null
+++ b/tzdata/update_test_app2/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="libcore.tzdata.update_test_app2.installupdatetestapp" >
+
+    <uses-permission android:name="android.permission.UPDATE_TIME_ZONE_RULES" />
+
+    <application
+        android:allowBackup="false"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@android:style/Theme.Holo.Light">
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/tzdata/update_test_app2/res/drawable/ic_launcher.png b/tzdata/update_test_app2/res/drawable/ic_launcher.png
new file mode 100644
index 0000000..96a442e
--- /dev/null
+++ b/tzdata/update_test_app2/res/drawable/ic_launcher.png
Binary files differ
diff --git a/tzdata/update_test_app2/res/layout/activity_main.xml b/tzdata/update_test_app2/res/layout/activity_main.xml
new file mode 100644
index 0000000..16e4b11
--- /dev/null
+++ b/tzdata/update_test_app2/res/layout/activity_main.xml
@@ -0,0 +1,98 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:context=".MainActivity">
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/content_path"
+            android:id="@+id/content_path_label" />
+
+        <EditText
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/default_content_path"
+            android:id="@+id/content_path" />
+
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/trigger_install_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/trigger_install" />
+
+    <View
+            android:layout_width="fill_parent"
+            android:layout_height="2dip"
+            android:background="#FF00FF00" />
+
+    <Button
+        android:id="@+id/trigger_uninstall_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/trigger_uninstall" />
+
+    <View
+            android:layout_width="fill_parent"
+            android:layout_height="2dip"
+            android:background="#FF00FF00" />
+
+    <CheckBox android:id="@+id/success_checkbox"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/success" />
+
+    <Button
+        android:id="@+id/trigger_nothing"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/trigger_nothing" />
+
+    <View
+            android:layout_width="fill_parent"
+            android:layout_height="2dip"
+            android:background="#FF00FF00" />
+
+    <Button
+        android:id="@+id/get_rules_state_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/get_rules_state" />
+
+    <View
+            android:layout_width="fill_parent"
+            android:layout_height="2dip"
+            android:background="#FF00FF00" />
+
+    <ScrollView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:scrollbars="vertical"
+            android:fillViewport="true">
+
+        <TextView
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                android:id="@+id/log"
+                android:singleLine="false" />
+
+    </ScrollView>
+
+</LinearLayout>
diff --git a/tzdata/update_test_app2/res/values/strings.xml b/tzdata/update_test_app2/res/values/strings.xml
new file mode 100644
index 0000000..9bb5f57
--- /dev/null
+++ b/tzdata/update_test_app2/res/values/strings.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">InstallUpdateTestApp2</string>
+    <string name="content_path">Content Path</string>
+    <string name="default_content_path">/data/local/tmp/out.zip</string>
+    <string name="trigger_install">Request Install</string>
+    <string name="trigger_uninstall">Request Uninstall</string>
+    <string name="trigger_nothing">Request Nothing</string>
+    <string name="success">Success</string>
+    <string name="get_rules_state">Get rules state</string>
+</resources>
diff --git a/tzdata/update_test_app2/src/libcore/tzdata/update_test_app2/installupdatetestapp/MainActivity.java b/tzdata/update_test_app2/src/libcore/tzdata/update_test_app2/installupdatetestapp/MainActivity.java
new file mode 100644
index 0000000..caa52c4
--- /dev/null
+++ b/tzdata/update_test_app2/src/libcore/tzdata/update_test_app2/installupdatetestapp/MainActivity.java
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package libcore.tzdata.update_test_app2.installupdatetestapp;
+
+import android.app.Activity;
+import android.app.timezone.Callback;
+import android.app.timezone.RulesManager;
+import android.app.timezone.RulesState;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Date;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class MainActivity extends Activity implements View.OnClickListener {
+
+    private EditText contentPathEditText;
+    private TextView logView;
+
+    private RulesManager rulesManager;
+    private Callback callback;
+    private ExecutorService executor;
+    private CheckBox successCheckbox;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+        Button triggerInstallButton = (Button) findViewById(R.id.trigger_install_button);
+        triggerInstallButton.setOnClickListener(this);
+        Button triggerUninstallButton = (Button) findViewById(R.id.trigger_uninstall_button);
+        triggerUninstallButton.setOnClickListener(this);
+        Button triggerCheckCompleteButton = (Button) findViewById(R.id.trigger_nothing);
+        triggerCheckCompleteButton.setOnClickListener(this);
+        successCheckbox = (CheckBox) findViewById(R.id.success_checkbox);
+
+        Button getRulesStateButton = (Button) findViewById(R.id.get_rules_state_button);
+        getRulesStateButton.setOnClickListener(this);
+
+        contentPathEditText = (EditText) findViewById(R.id.content_path);
+        logView = (TextView) findViewById(R.id.log);
+        executor = Executors.newFixedThreadPool(1);
+        rulesManager = (RulesManager) getSystemService("timezone");
+        callback = new Callback() {
+            @Override
+            public void onFinished(int status) {
+                logString("Operation finished. Status=" + status);
+            }
+        };
+    }
+
+    private abstract class MyAsyncTask extends AsyncTask<Void, String, Void> {
+        @Override
+        protected void onProgressUpdate(String... values) {
+            for (String message : values) {
+                addToLog(message, null);
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        MyAsyncTask task;
+        if (v.getId() == R.id.trigger_install_button) {
+            final String contentPath = contentPathEditText.getText().toString();
+            final File contentFile = new File(contentPath);
+
+            // Convert the contentFile to a ParcelFileDescriptor.
+            final ParcelFileDescriptor distroFileDescriptor =
+                    createParcelFileDescriptor(contentFile);
+            if (distroFileDescriptor == null) {
+                return;
+            }
+
+            Callback callback = new Callback() {
+                @Override
+                public void onFinished(int status) {
+                    logString("onFinished: Finished install: " + status);
+
+                    // TODO(nfuller): Can this be closed sooner?
+                    try {
+                        distroFileDescriptor.close();
+                    } catch (IOException e) {
+                        logString("Unable to close ParcelFileDescriptor for " + contentFile + ": "
+                                + exceptionToString(e));
+                    }
+                }
+            };
+
+            task = new MyAsyncTask() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    if (!contentFile.exists()) {
+                        publishProgress("Error: " +  contentFile + " does not exist.");
+                        return null;
+                    }
+                    try {
+                        int requestStatus = rulesManager.requestInstall(
+                                distroFileDescriptor, null /* checkToken */, callback);
+                        publishProgress("Request sent:" + requestStatus);
+                    } catch (Exception e) {
+                        publishProgress("Error", exceptionToString(e));
+                    }
+                    return null;
+               }
+            };
+        } else if (v.getId() == R.id.trigger_uninstall_button) {
+            task = new MyAsyncTask() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    try {
+                        int requestStatus = rulesManager.requestUninstall(
+                                null /* checkToken */, callback);
+                        publishProgress("Request sent:" + requestStatus);
+                    } catch (Exception e) {
+                        publishProgress("Error", exceptionToString(e));
+                    }
+                    return null;
+                }
+            };
+        } else if (v.getId() == R.id.trigger_nothing) {
+            final boolean success = successCheckbox.isChecked();
+            task = new MyAsyncTask() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    try {
+                        rulesManager.requestNothing(null /* checkToken */, success);
+                        publishProgress("Request sent");
+                    } catch (Exception e) {
+                        publishProgress("Error", exceptionToString(e));
+                    }
+                    return null;
+                }
+            };
+        } else if (v.getId() == R.id.get_rules_state_button) {
+            task = new MyAsyncTask() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    try {
+                        RulesState rulesState = rulesManager.getRulesState();
+                        publishProgress("Rules state: " + rulesState);
+                    } catch (Exception e) {
+                        publishProgress("Error", exceptionToString(e));
+                    }
+                    return null;
+                }
+            };
+        } else {
+            addToLog("Unknown button", null);
+            return;
+        }
+        task.executeOnExecutor(executor);
+    }
+
+    private ParcelFileDescriptor createParcelFileDescriptor(File contentFile) {
+        try {
+            return ParcelFileDescriptor.open(contentFile, ParcelFileDescriptor.MODE_READ_ONLY);
+        } catch (FileNotFoundException e) {
+            logString("Unable to create ParcelFileDescriptor from " + contentFile + ": "
+                    + exceptionToString(e));
+            return null;
+        }
+    }
+
+    private void addToLog(String message, Exception e) {
+        logString(message);
+        if (e != null) {
+            String text = exceptionToString(e);
+            logString(text);
+        }
+    }
+
+    private void logString(String value) {
+        logView.append(new Date() + " " + value + "\n");
+        int scrollAmount =
+                logView.getLayout().getLineTop(logView.getLineCount()) - logView.getHeight();
+        logView.scrollTo(0, scrollAmount);
+    }
+
+    private static String exceptionToString(Exception e) {
+        StringWriter writer = new StringWriter();
+        e.printStackTrace(new PrintWriter(writer));
+        return writer.getBuffer().toString();
+    }
+}