Fix CharBuffer.subSequence return type.

Bug: 3484927
Change-Id: I06dae03b0803d1373e268e854e9e0e4b6c59e13a
CipherTest fixes

Bug: 9095447

(cherry picked from commit 1eba66d802f4edfaa3ca599f196e282bc110eff9)

Change-Id: I6709eebcbede0ba617462bf49dd858f98246555f
Flip sense of negative isUnsupported* methods

Change-Id: I024a72ec535978dc3a009d6433f6a65133feb3b8
Merge "CipherTest fixes"
Merge "Flip sense of negative isUnsupported* methods"
NativeCrypto: add debug option for SSL streams

Print out the key in format suitable for Wireshark decrypting. To use
this, see the comments next to the newly-defined flags.

Wireshark 1.6 that comes with Ubuntu seems to be broken. Wireshark 1.8
works.

Change-Id: Ifd6d75f03f76068085cec0620b465793c2d60587
Merge "NativeCrypto: add debug option for SSL streams"
Use the jarjar names of security providers

The platform was using the security.properties file, but running the
tests outside of the platform was using the registerDefaultProviders()
call. Those won't work with a jarjar'd library.

Change-Id: If0472d99b45c274a63003c53bf91a37bfb23fda4
Merge "Use the jarjar names of security providers"
NativeCrypto: change debug format string to "%.*s"

This ensures the string stops at the right place instead of running off
the end of the buffer. This still doesn't help much for binary data.

Change-Id: Ia56b07a586d8f55ebb0d4237f6d598b307f065fe
Merge "NativeCrypto: change debug format string to "%.*s""
NativeCrypto: check that npnProtocols != NULL

There appears to be a path where an application can not specify which
NPN protocols it supports but can request that it is negotiated. Match
the advertise method by checking that we have NPN methods set before
using them in a call back to OpenSSL.

Bug: 9186885
Change-Id: I1f35d45709f264d6e2f0c7fef316cb6d93db4ed1
Merge "NativeCrypto: check that npnProtocols != NULL"
Use correct signature for NativeBN_BN_is_prime_ex

Change-Id: Ic08c4142542c5bd28e964a22270beed13297b9d6
Merge "Use correct signature for NativeBN_BN_is_prime_ex"
Fix conscrypt package name in SecureRandomTest

Change-Id: Ie34e1b3c7b6a1813e9b055d303bad4463220f5c4
Merge "Fix conscrypt package name in SecureRandomTest"
Move initialization check higher for updateAAD

This allows the tests to pass on the RI and Dalvik by ordering the
exceptions in the same way.

Change-Id: Icb5a313f86c90ed8f1d703b5cb996783ca3a214b
Merge "Move initialization check higher for updateAAD"
PBKDF2 tests to exercise new, correct PBE implementation.

Bug: 8312059
Change-Id: I614a43a0022393cb16250f4991a7156b05b0860c