libcore/luni: Use -fno-strict-aliasing for now

This will be reverted once we have a proper fix.

Change-Id: Iab4663a5f96ff9770371f54697aa872260037ac1
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Don't force MemoryBlocks on classes that don't care.

Only MappedByteBuffer and DirectByteBuffer need to know
about this abstraction.

Change-Id: I293284c8b8a73ac01463337dc8a1e22d16cd378d
Fix java.util.Random performance regression.

With the monitor change in ART, getting the identity hash code of an
object puts the hash code in the lock word. This hurts performance
if you synchronize on said object since it makes it that we always
go slow path for monitor enter and exit. Although the fix
allocates a new object in the Random constructor, it should not cause
performance problems assuming people don't excessively create new
random number generators.

Change-Id: I750e57fb7c5f70e66ad85d19e2c065e9e52a613f
Add a cache to ICU.getBestDateTimePattern.

Brings the time down from 7ms to 7us for a cache hit on Nexus 4.

Bug: 11447043
Change-Id: I7cfc055c264ce49dadc72b5acdc2f2b0b339a5a1
Merge branch 'android-4.4.1_r1' into HEAD
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Revert "Don't force MemoryBlocks on classes that don't care."

This reverts commit 9f39554d91462f0730bacedec7a18fa7c0fd75c3.
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Fix several decoder bugs.

- NativeConverter should report unterminated character
  sequences to managed code.
- CharsetDecoderIcu should report those errors correctly
  from flush()
- InputStreamReader should check the return value of
  flush() and not ignore it altogether.

bug: 11665359
bug: 10729779

Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037
Fix Thread.sleep(0) of an interrupted thread

Bug: 12929305
Change-Id: I3061c3345c68de8bcf438e6935446b4f7cd76001
Switch Random to use AtomicLong

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

Change-Id: I4ed94e0290dad83ed7570a8e7fd906e025df4636
Improve detection of CloseGuard protected resource leakage

* Add CloseGuardMonitor to intercept and collate CloseGuard reports and if
  necessary throw an exception listing the resource leaks.
* Add ResourceLeakageDetector to abstract away the CloseGuardMonitor which will
  not work on RI.
* Add AbstractResourceLeakageDetectorTestCase as a base class for tests
  that need to detect resource leaks, in future this could be handled by
  modifications to Cts and Vogar test runners.
* Remove CloseGuardTester and its sole usage in ProcessBuilderTest.
* Remove CloseGuardGuard from within URLConnectionTest
* Change ZipFileTest, ZipInputStreamTest, ZipOutputStreamTest,
  ProcessBuilderTest, URLConnectionTest to use new mechanism, fix issues that
  are identified and do some cleanup/remove duplicated code.

Bug: https://code.google.com/p/android/issues/detail?id=66383
Change-Id: Id026dbb6bc66091a15f07329e6371cd0d1f32cf5
CipherInputStream: increase buffers for speed

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

Bug: 12246774
Change-Id: If61c0a055fe1b8e87909711b15d0441fcdbe46c7
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: Iff2774f139c3cd4e1a24b7dc5ede533448823c51
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Merge remote-tracking branch 'cm/cm-11.0' into HEAD
Merge remote-tracking branch 'cm/cm-11.0' into HEAD