Use /usr/bin/env python for the shebang in tools/generate-operator-out.py

This allows you to use a python binary that is in a non standard place.
Particularly useful if you're using a python2 virtual environment and
your system python is python3.

Change-Id: Ifb32feadffabf7a6263a8688a20fb005fa43b9da
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
restore our history

restore backup

Change-Id: Ib49c0423c0ef2406c7a9bfc9d718e4e8b2d1eb44
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