Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

Bug: 13678484
Change-Id: I01cddef287767422454de4c5fd266c812a04d570
Switch Random to use AtomicLong

This removes the synchronization from next() and replaces the seed with
an AtomicLong.

Change-Id: I4ed94e0290dad83ed7570a8e7fd906e025df4636
Improve URI.equals performance.

The main improvement is that we're vastly reducing
the amount of garbage this method creates.

Also, get rid of some incorrect checks and add a new
benchmark test case.

Before vs. After:

URI                            Equals     1540.1 =
URI EqualsWithHeavilyEscapedComponent 11921397.1 ==============================

URI                            Equals     1337.2 =
URI EqualsWithHeavilyEscapedComponent   588934.3 ==============================

Change-Id: I9ddb87b8267f0ac6a3ac85c2989cc0dd305ef6a1
Add CAP_BLOCK_SUSPEND to OS constants

Bug: 10901016
Change-Id: I162bde82bce9fca8eabc7168a172d3d8365e1578
libcore: Set CAP_LAST_CAP as CAP_BLOCK_SUSPEND

CAP_LAST_CAP was being set to CAP_ALARM_WAKE which did not allow
system processes to acquire CAP_BLOCK_SUSPEND capability.
This change correctly sets CAP_LAST_CAP to CAP_BLOCK_SUSPEND.

Change-Id: I812edf75eec8f228e2a5d49ae0d3a250e10e0994
Libcore: Add .aac MIME TYPE

Change will add support for .aac files.

CRs-Fixed: 573663
Change-Id: If2564b439fd5943396959ba1f6a2d7a5a53923ca
Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Bug: 12114500
Change-Id: I8ea69de7b1cfbd811977a5629eb0af665f6dd66a
Remove old fork-and-specialize API

As promised, this is the cleanup patch-set which removes the
old native "fork and specialize" API, which has been replaced
by a slightly-enhanced one which can close the Zygote socket
descriptors in the Zygote child.

Change-Id: Icaeab730bee8638354dc664524e4118cdd946d2f
libcore: fix error in javdoc todo file generation

javadoc is faling to generate todo file due to
relative path and this is causing sdk build to
have spurious error. changing the path to absolute
to ensure file created and error fixed

Change-Id: I7c89942262434d9639b03f72fe886780f44bfba7
Audio: AWR-WB format playback support in email and download

- amr-wb format are not it the supported mime type
- Add amr-wb in the supported audio mime type

Change-Id: Iad721f86a9bc1eccf8c94204b7a4d47961dd1efa
CRs-Fixed: 637271
CipherInputStream: increase buffers for speed

This increases speed of CipherInputStreamBenchmark from 606ms to 28.5ms.

Bug: 12246774
Change-Id: If61c0a055fe1b8e87909711b15d0441fcdbe46c7
Revert "CipherInputStream: increase buffers for speed"

This reverts commit 49d3cf59a86525b93e63994f5e1970e4a2f05fb4.
Revert "Switch Random to use AtomicLong"

This reverts commit d84c3084917635c4c5c2ffe26c0d30880e6e501a.
Disable Strict Aliasing

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Merge remote-tracking branch 'OptiPurity/kitkat' into kk4.4