surfaceflinger: Allow gpu to render widevine level3.

Allow gpu to render widevine level3 but keep
blocking screen shots.

CRs-fixed: 428647,424769,421767
Change-Id: I914232a062acbb7b17901dbf2b414973230e59d9

Conflicts:

	services/surfaceflinger/Layer.cpp
(cherry picked from commit f4c511eadf2450f1764617245205ffb940b710f8)
(cherry picked from commit 98d7ecf2a82fe6c2a82285b64ea9a8d8da443e9a)
(cherry picked from commit 2dcc6c014c7593d4d18667299718832a339905e3)
Fix for VirtualDisplay CTS issues.

Following CTS cases fails without the change
1. testEncodeVirtualDisplay
2. testMultipleVirtualDisplays
3. testSingleVirtualDisplay
4. testPrivatePresentationVirtualDisplay
5. testPrivateVirtualDisplay

Issue happens because displaySurface not being initialized
as its becoming local variable and loosing the context.

Change-Id: I54ce623f611faf7fc5d4d00b0d042f9943b57bbe
libEGL: allow devices to workaround Google bug 10194508

Most older blobs don't have the EGL_KHR_gl_colorspace
extension and need this workaround.

Change-Id: Ifc5d097c1a0b68275d23c2d191976ac96631b695
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
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
Revert "get rid of MemoryHeapPmem"

This reverts commit 7a7524810a0950c1c2b18014a8f1c637275165c4 and
makes MemoryHeapPmem conditioned to BOARD_NEEDS_MEMORYHEAPPMEM

Change-Id: I2f38340984ba87d6970d17ec944e3faded4132c8
exynos4: getphys implementation on buffermanager for samsung omx
exynos4: ui: define USAGE_HW_FIMC1 to support gralloc

Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=5179fef67cadaa10d72cfe6764629565bc9a1e4e

Change-Id: Id194446eb332869f677dfb7e94c73aa3f52ee4b0
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
DexOpt anything on /system in /cache/dalvik-cache
installd: Delete cache properly for devices using datadata partition

The java side already checks /data/data for free space but installd
still checks /data causing it to never reap the cache (because it
thinks that enough free space is available.)

Change-Id: I736af6ff7ea0c8ae07900168f6b8ac2f7a4dbe0b
surfaceflinger: Reimplement hwrotation

Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
ui: exynos4: getphys is common
GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats

Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768

Conflicts:
	libs/ui/GraphicBufferAllocator.cpp
libui: exynos4: apply FIMC usage flag on format HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED

Change-Id: I8a98e593cb60d0843e83a5e431142410e26d82e7
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>
binder: Add MemoryHeapBaseIon