SystemServer: Looper's getMainLooper to return ServerThread

Fix to ensure Context.getMainLooper and Looper.getMainLooper
returns ServerThread for system_server. Currently, Looper's
getMainLooper returns null.

Change-Id: I5324a1cc00e27a79ba97836a9377a584e6f76b15
Blacklist => Whitelist
Avoid adding FORWARD_LOCK flag to an updated system app

Consider the following case:
1. An app exists in /system/app or /vendor/app. (i.e, it's a system app)
2. If the app would be updated as a forward-lock app by downloading from
   market(google play), then it would be installed in /data/app-private.
3. Moreover, if it would be updated by the whole system image (i.e, FOTA
   or something like that), then the app would be applied a FORWARD_LOCK
   flag.

The app SHOULD NOT have a FORWARD_LCOK flag. Because the resource path
of such app does not refer to the proper resources to access.

Change-Id: I0750f69a93a3115f4201029796b598507de3555f
jni: remove obsolete flag from makefile

Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Sensors could be disabled by any application

In the SensorManager API unregisterListener any application could
unregister any sensor. This lets any application disable a sensor
which another application is using.
This fix restricts the applications to only be able to unregister
a sensor it has previously registered to.

Change-Id: Ief926dd29f480dd97626160810dff87a8d3ac8dc
Revert "Additional omap-zoom updates"

This reverts commit bf6a640be50279851a92a0e1784f62d81ed73658.
Revert "libstagefright updates"

This reverts commit 48101a9201fbd8896ecc116b25b828697198218f.
Revert "we do not have the libasfextractor"

This reverts commit 5fc064f2d449cea3af4900c5a7770d312cdb054a.
Revert "Fix crash"

This reverts commit 91aad809484e0fbbac2dcfecfce30c02bd9b7436.
Revert "Additional core OMAP_ENHANCEMENT requirements"

This reverts commit ef4e45c922b16241698c503f6f88c4265a1631ba.
Revert "Fix build"

This reverts commit bd0b221e43a38b0160296ac9893452a71f8b67b7.
Revert "omapzoom changes for stagefright"

This reverts commit a238646aff0e87968dc81ad3f1c2e0c0b8350949.
Revert "omapzoom surfaceflinger updates"

This reverts commit 876a334dfcf07977bd1565006a1a2612658985c0.

Conflicts:

	services/surfaceflinger/Layer.cpp
Revert "Update 'updateTexImage()' for OMAP_ENHANCEMENT compatibility"

This reverts commit ba9fb616394e4f625d28d1d49e1cb8e714ecb0aa.

Conflicts:

	libs/gui/SurfaceTexture.cpp
Revert "GUI libs OMAP_ENHANCEMENT support"

This reverts commit 0b2f8e48fb0255aff0e483bd77b4a195f8ccf0e5.

Conflicts:

	libs/gui/ISurfaceTexture.cpp
	libs/gui/SurfaceTexture.cpp
	libs/gui/SurfaceTextureClient.cpp
Fix graphics after reverts :-/
Revert "Import the necessary header changes for OMAP_ENHANCEMENT from omapzoom"

This reverts commit 19ce2e51778a6a94855c9c15935d3357a3668dc6.
Revert "EGL: Fix reporting of incorrect extension string"

This reverts commit 0b31453bfa3d71664bb6fa154f6a8a5edc6ef543.
Removing wrong equals method in comparator.

This implementation of equals method has been likely created by
template in an IDE. It is useless, possibly leading to poor performance
and completely violating the contract of equals method as defined in
Object base class.

Change-Id: I5e7fd759b7bd9370b44d9374b57390c4e9feba02
stagefright aacenc: Fix inline asm constraints

Output-only parameters should use =r or =&r constrains, never +r.

This fixes a lot of warnings about the variable 'result' being
used uninitialized.

Change-Id: Ie689fce8c6ecd874d4fc66e87687c67551d9ab6a

Conflicts:

	media/libstagefright/codecs/aacenc/basic_op/basic_op.h

Conflicts:

	media/libstagefright/codecs/aacenc/basic_op/basic_op.h