GC triggering performance optimizations

Copy the correct starting heap size at process init.
Interfaces to set GC/managed heap parameters.

Change-Id: Ia2b158aa28254d88f68c9534a0eef580aa811b10
Revert "Revert "Compatibility work around for bad graphics driver dependency.""

This reverts commit 38b657265ccc5ae45bd7860a68b0d9373b47a2f3.

Change-Id: If350d73839f1ed5e01af4299d44837e619d14d66
libgui: Add ICS/MR0-compatible client::createSurface constructors

Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c
surfaceflinger: Reimplement hwrotation

Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
Sensor: Add RotationVectorSensor2

(ported from 4.1)

Some ICS apps (namely, Google Maps) expects a rotation vector to be
available. Newer devices, this is provided by either Android's
sensor fusion (requires Gyro) or by hardware sensor fusion (MPL).

Older devices will lack this virtual sensor and compass in Google
Maps will not work. To fix this, we can provide our own rotation
vector sensor by converting the values from the orientation sensor.
(They are basically the same information in different formats.)

Thanks to Unhelpful for the help with related math.

Change-Id: I39489b3a5ce7c7d890768614357f32cc491bd6d9

Conflicts:
	services/sensorservice/SensorService.cpp
surfaceflinger: odd hw rotation (90/270) patch for swapping width/height

This patch works in addition to the following commit
re-implementing ro.sf.hwrotation:
https://github.com/CyanogenMod/android_frameworks_native/commit/7d283431efffc4402cb1a6cacf5da64729c883bb

When using values of 90 and 270 for ro.sf.hwrotation the
LCD width and height also need to be swapped to display properly.

NOTE: This patch does not fix the initial startup of bootanimation

Change-Id: Iab9de66348967a378dd73a41bc96d632f750386c
Signed-off-by: Hashcode <hashcode0f@gmail.com>
Revert "remove support for HWC < 1.0"

This partially reverts commit 30bcc61431d8e3bef779472dd52a7b156dcaba09
and updates to the current API. Tested on 0.1 blobs from Tegra2/3
and OMAP3/4

Change-Id: I43cee8852b266d68d1edefbe7ac988b9dbcf7227

Conflicts:
	services/surfaceflinger/DisplayHardware/HWComposer.cpp
sensors: Add dummy light sensor

Some devices have a sysfs toggle for the lightsensor instead of
passing the LUX values for userspace processing; for those,
use BOARD_SYSFS_LIGHT_SENSOR:=<sysfs path>

This is necessary for the rest of userspace to recognize its existence
and toggle it for auto-brightness. It doesn't generate actual light
values, though; all backlight adjustments are made in-kernel.

Change-Id: I0e546b4740720bd34d1e1d85a96b295fcc697106

sensors: dummy ls: set unique handle

handles and types are usually the same, but it's not mandatory.
Sony DASH use custom handles, and the previous assumption broke
Proximity sensor on Sony devices.

Change-Id: I954e13765f42341e6b5393a12556f6a007c4e494

Conflicts:
	services/sensorservice/Android.mk
	services/sensorservice/SensorDevice.cpp
SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab
surfaceflinger: Update support for hwc < 1.0

Add android::HWCLayerVersion0 implementations of the new methods

Change-Id: Ic199c9b4262049b74632a57ad2b2cdf462a05b43
libgui: Add pre-MR2-compatible symbol for setPosition

SurfaceControl::setPosition now takes floats instead of integers as
arguments, which breaks linkability from pre-MR2 blobs. Add a direct
compatibility wrapper, since the values are treated in the same
way.

Change-Id: I0fd0708faeb4495a2dbbb659997d6500f165ec98
frameworks/native: Fix toroplus radio with CFLAGS

This is a commit to fix the LTE radio on toroplus,
since the binaries contain a broken reference to
an old no longer existent object. This fixes that
with a CFLAGS to be enabled in the .mk files of the
toroplus device files (like BoardConfig.mk).

Credit for the original fix goes to
Sean McClenaghan (cyberkitsune09@gmail.com)
http://review.cyanogenmod.org/#/c/47134/

PS 2-3: forgot some stuff in the commit message

Change-Id: I2c0f05d1f70b96ad801971f23f6f9cf4e0fa7167

Conflicts:
	libs/gui/Android.mk
Unbreak libgui

Change I2c0f05d1f70b96ad801971f23f6f9cf4e0fa7167 broke libgui for a
bunch of pre-4.1 blobs by changing the surfaceclient API, so bring
it back

Change-Id: I1f6ce3b886539d0e972bbe41116192bf162be968
Support forcing all screenshots into a CPU consumer

Looks like a full GPU path is less efficient on some GPU
drivers that we're still using, and CPU is reliably faster...
(there's probably a locking condition going on somewhere, this
needs to be looked into)

Change-Id: I8878796a117d65bf2324507cf8755cadce49f6dc

Conflicts:

	libs/gui/SurfaceComposerClient.cpp
Revert "remove support for glReadPixels screenshot path"

This reverts commit 3ca76f416bc8665a97636ca8a2d0128b9da9d92c.

Conflicts:

	libs/gui/SurfaceComposerClient.cpp