Merge tag 'android-4.4.1_r1' into HEAD

Android 4.4.1 Release 1
runtime: Invert the default for dexopt-on-cache

The growth of /system apps and total /data space are making this
device-breaking (insufficient space to dexopt everything to
/cache), pointless (/data has more than enough room to hold
the cache), and in some cases, both.
The default behavior is now the same as mainline Android's: dexopt
everything to /data. Set dalvik.vm.dexopt-data-only=0 to change
that and dexopt /system apps to /cache. If you do that, make sure
your /cache can accomodate double the size of the dex classes in
system, since that has been observed during dex2oat

Change-Id: I8c1debee6e16a6fb162e42a7c9a47ec076eb69df
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.

We were not checking for null after decoding the reference, this
meant that we incorrectly created null weak global references instead
of returning null.

Issue: 63929
Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
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.

Round 2: use proper type (jsize) for iteration variable;  whitespace.

Round 3: indentation.

Bug: 12114500
Change-Id: I31d25831b477b076d980c531d57773f9c8c83261
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: I096f058e851aa079e342ecc718ff5757db68c8cd
Merge "Fix NewLocalRef, NewGlobalRef to handle cleared weak globals." into cm-11.0
Fix FindFieldID to use class's classloader to find field type.

Also includes a test case, though the test case does not recreate
this exact issue because the attached native thread would need to
have a null context classloader.

Bug: 11737351
(cherry picked from 62509b662929175228bb0d0f014ef4ef4e33be10)

Change-Id: I6f15aba990eaf84696c02c37d02e80f88aff59ed
Fix stack trace for proxy methods and added test case.

Bug: 11861564

Change-Id: I9513359ff9e5d345ee71d84388afed02bd114ecf
(cherry picked from 228d6b8a4f0a21c1e9b2372c3104ce4ee19f65b4)
Search for miranda methods in virtual methods instead of interface.

Also added tests that get miranda methods via reflection and jni.
Miranda methods can't be found via reflection, and have the interface
class as their declaring class when found via jni.

Bug: 11736932
(cherry picked from 201803fb1acd15b9daae51d816e1b08aededdc41)

Change-Id: If6700303698967b7fd2c0152216461c447cbf2f9
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.

We were not checking for null after decoding the reference, this
meant that we incorrectly created null weak global references instead
of returning null.

Issue: 63929
Bug: 13400455

(cherry-picked from e8c48db6bb507d7fa20c78481c58c23be0045f67)

Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
Merge "Search for miranda methods in virtual methods instead of interface." into klp-dev
Merge "Fix FindFieldID to use class's classloader to find field type." into klp-dev
Merge "Fix stack trace for proxy methods and added test case." into klp-dev
Fix stack overflow for mutual recursion.

There was an error where we would have a pc that was in the method
which generated the stack overflow. This didn't work however
because the stack overflow check was before we stored the method in
the stack. The result was that the stack overflow handler had a PC
which wasnt necessarily in the method at the top of the stack. This
is now fixed by always restoring the link register before branching
to the throw entrypoint.

Slight code size regression on ARM/Mips (unmeasured). Regression on ARM
is 4 bytes of code per stack overflow check. Some of this regression is
mitigated by having one less GC safepoint.

Also adds test case for StackOverflowError issue (from bdc).

Tests passing: ARM, X86, Mips
Phone booting: ARM

Bug: https://code.google.com/p/android/issues/detail?id=66411
Bug: 12967914
Change-Id: I96fe667799458b58d1f86671e051968f7be78d5d
Properly tolerate missing declaring source files

Broken in 228d6b8a4f0a21c1e9b2372c3104ce4ee19f65b4

(cherry picked from commit 7c6aca27dd2df58ac3d83a93ec5848e2b7d3159a)

Bug: 13575571
Bug: 12802375
Change-Id: Ia8a3196b15f8ed29810d0b6f09f81c7ae4e7480e
art: Implement SetTargetMinHeapFree, SetTargetHeapConcurrentStart

* Commit: GC triggering performance optimizations
  ID: 7646e2eb41024d152d76b269653c2321e2cfbd23

  introduced additional functions that needed to be implemented.

Change-Id: I5ec4ae74dc70f1859db2bae8588e697b147a2682
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1
Merge remote-tracking branch 'cm/cm-11.0' into HEAD