fix AudioTrack and AudioRecord JNI

AudioTrack and AudioRecord JNI should not cast
jshortArray to jbyteArray. This appeared to work with Dalvik
but causes data corruption with ART.

(cherry picked from commit 9d02848e902d04417df616354db3a18c03e639b7)

Change-Id: Ie36624d3ea06042373c64edced4b5e30b7b1ee86
Fix possible NPE in SyncHandler.onBootCompleted()

If onBootCompleted() was called a second time, it would have throw a
NullPointerException since the queue object would have already been
set to null by the previous call. This commit just makes such an
object behave as an empty queue instead of throwing the exception.

Change-Id: I4472ff89a2a8dc93c3064210d2a49e0063f6efc0
PackageManagerService: fix StrictMode violation in getFileCrC

E/StrictMode(  915): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
E/StrictMode(  915): java.lang.Throwable: Explicit termination method 'close' not called

Change-Id: I8d68c05f32c0c299e9102ffccfcb4776e21a5b4b
ActivityManager: reduce reuse recycle

These inner classes are registered as services for each system process to dump information
during certain events like ANRs.  We can combine to reduce memory footprint by eliminating
the redundant inner classes and registered services.

Change-Id: I7c85323fb42ea67503841cc0717ef915ae9c851f