GC triggering performance optimizations

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

Change-Id: Ia2b158aa28254d88f68c9534a0eef580aa811b10
Merge UDC changes from Perforce

//depot/aus/PE/Integrations/ds_udc/android/4.2.1_r1/int_releases \
/DS1.5.0.22_b1-Android-4.2.1_r1-QOEM-RFL

P4 Changelist: 721622

Change-Id: I9cfa5f45e99cf164bfbc6e00e801f2c1c1d70214
servicemanager: Add listen service to the service table

- Listen is a voice activation feature.
- When an application registers a "keyword" with
  ListenService, then events are sent to application
  when that keywork is spoken by user and detected
  by ListenEngine.
- ListenService runs within the MediaServer process.
  The ListenService needs to be added to service table
  in order for application thread to have permission
  to access Listen functionality.

Change-Id: I8c79bebc92920d0b62b12ef925cb35a59644ee86
Telephony(MSIM): Add support for MultiSim.

Add below services to service_manager to support MultiSim.
  phone_msim
  simphonebook_msim
  iphonesubinfo_msim
  isms_msim

Change-Id: Icbb8163a7b9a3d5c36764ebd5a2272e2bb6cc387
Configure dalvik heap parameters for low memory devices

Reduces after boot memory footprint by about 5-8MB
Note: This is for low memory based devices only (~512MB RAM
or less)

Change-Id: I4b4b9ae3efaff96551457e566bbb9bd4f0f23fd5
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
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>
Merge "native: remove QCOM_BSP cruft" into android-4.4
native: remove QCOM_BSP cruft

* the code that acutally does anything with this code does not exist yet in 4.4 - this is useless and
may be causing problems - remove it
* seems to have been merged accidentally with https://github.com/omnirom/android_frameworks_native/commit/d9805a9a80128421c5fbf5fb8300f0fdf11fd3d1
and ifdeffed in later patches

Change-Id: Ia4a8f7e0cc6f60ce5644107439685476717b18d6
Merge "libgui: Add pre-MR2-compatible symbol for setPosition" into android-4.4
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
Revert "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""

jellybean camera driver need this symbol

This reverts commit 2dccfdcd265ca86cca5ac863d921e5c647b93073.

Change-Id: I4b48b2e75966c6bb97113ff7be54ed925be25bb8
Merge "Revert "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""" into android-4.4
FM Radio: Add support for FM Radio in Android

moved permissions to frameworks/native

Change-Id: I27ded70f7bc116a1b1c9cff2383c4899afe746ec
Revert "libgui: Bring back support for mHeap-based screenshots"

This reverts commit e5dfc8f220eed32fffc0b26b6aca55444f4f7b8e.

This patch was obviously horribly mismerged, as it brings in a pile
of non-ifdefed code when implementing a patch that was previously
100% ifdefed.

It's also causing crashes on i9100g

Change-Id: Ia1ade0b76269204fab6660a4e1ad26853a043e60
Merge "FM Radio: Add support for FM Radio in Android" into android-4.4
libEGL: workaround for google bug 10194508

Some of device's older blobs don't have EGL_KHL_gl_colorspace extension
and need this workaround

Change-Id: I811538e7d595f18055d13ca608098c049b4cb9b9
Revert "native: remove QCOM_BSP cruft"

This reverts commit 929c8e513a26a542e6b8297ceaad34e94c97ad5f.
Add support for custom buffer sizes..

Add native window properties NATIVE_WINDOW_SET_BUFFERS_SIZE to the
perform function of Surface to set the user defined size
of graphic buffers. This is needed for adding support for
the playback of interlaced content.

Change-Id: I8354c29d2ffcc03178fae86dfa449cbefd24ae55

Conflicts:

	include/gui/BufferQueue.h
	include/ui/GraphicBuffer.h
	libs/gui/IGraphicBufferProducer.cpp
	libs/ui/GraphicBuffer.cpp
(cherry picked from commit 989265bbdcaeab8ae59e8615aebc3a20b2775436)
(cherry picked from commit 25c5de066d911c4720cc6570a8bb9e21e899e4fb)
(cherry picked from commit e9a8f7b1f1334d4a36eebde3b3f7ff141ae26bc7)

Conflicts:
	libs/ui/GraphicBufferAllocator.cpp