Rotation Lock: Keep last rotation position when locking

Change-Id: I453f1eb151b27e28a03d969411a1ea4d0f7b0a66
Revert "build fix"

This reverts commit ea46e4aed81eef4eb622d080cb331706107f38a1.

Conflicts:
	libs/androidfw/Android.mk

Change-Id: Iac244126a3f44f7532d3a6e83671cae6728d69a8
Fix descriptor leak after accepting connections

After accepting a connection on a listening socket and
storing the resulting FileDescriptor into a newly created
LocalSocketImpl, the new impl's "descriptor was created
locally and should be closed normally" flag should be set.
Bug: 11805817
(cherry picked from commit 3e7305c6bf6062b5cb1e2ddcec6c6d30b4a8bc0d)

Change-Id: I723d7c5544ee4b6858894c215716cbc32a958df1
Fix socket descriptor leak from Zygote to child app

Due to an API change in LocalSocket, Zygote must now
manually close the FileDescriptor it created when it
registered a LocalServerSocket.  The LocalSocket.close()
routine will no longer do so.
Bug: 12114500
(cherry picked from commit 70ef29b04ee4ef7d7acfec79041dbe800961195e)

Change-Id: Ief23a3c99e007dc4aa6f94dfb47a1b2b6c854dad