ST_ERICSSON: Adding suport for native pixel formats

- Add support for ST-Ericsson native pixel formats and conversion to
    and from these formats.

adapted from http://review.cyanogenmod.org/#/c/29600/

Change-Id: I8eb6dec59fc0c862590641e7fed7742a3491a155
FM Radio: Add support for FM Radio in Android

moved permissions to frameworks/native

Change-Id: I27ded70f7bc116a1b1c9cff2383c4899afe746ec
Raise MIN_UNDEQUEUED_BUFFERS to 3

Change-Id: I1c91a2197903f441f4c87f70643616733f635229
Overlay support for legacy camera libs

Move http://review.cyanogenmod.com/#/c/13285/ to proper place for jellybean.

1. Rename OverlayHtc to Overlay in file names
2. Use BOARD_USES_LEGACY_OVERLAY to enable

Signed-off-by: Evan McClain <aeroevan@gmail.com>
Change-Id: Ib6afd1b610b1d3e263fcaa38585e7a1116baaf58
libs/gui: Update TRANSFORM HINT from BufferQueue

Read TRANFORM HINT value from Buffer Queue rather than STC.
STC's hint will be updated only when QueueBuffer is called.
So any query from client for hint in between two DequeueBuffer
call will read wrong value.

(cherry picked from commit 0618a92c24576e104043d139aaf92ecec2c0df88)

Change-Id: If3a244207e0584ee417deb36d357fe0ab7c1a96d
frameworks/native: surfaceflinger: Do not wait for vsync for MDP Composition

SurfaceFlinger waits for next vsync cycle if a frame
is available from client. For MDP 3.0 targets, we wait
for vsync cycle in every composition step. If a frame
if available from client just after vsync, we would delay
it showing on display by one vsync cycle also making client
wait in DQ. As MDP composition waits for vsync, remove wait
for vsync in composition step when in MDP Composition.

Change-Id: If0054e8efc9fcfb8c621f45f130e054a799703c4
SF/HWC: Disable Vsync for copybit layer only

(cherry picked from commit a546a9970674730e734fbf2fd59982c746b73667)

Change-Id: I09a71927e55c95c790e92ed9bce88447d59be267
surfaceflinger: Add all display connections to connection list.

1. Revert "surfaceflinger: Remove deadlock condition."
   This reverts commit 3924ab90a956b15610f45e229e051756c94ba1b8.
2. Add all display event connections to connection list to avoid
   deadlock condition.

Conflicts:

	services/surfaceflinger/EventThread.cpp

Change-Id: Ia65e217a5130572d0724d3c4fd9f2e962c0ffb50
(cherry picked from commit 5aec1edc1f4fa0562d379b5c85a1c9de943b7087)
CRs-Fixed: 421346
frameworks/base: surfaceflinger: Enable dither if needed

SF is checking if dithering is required but not enabling it.
Enable for layer drawing and  also for screenshot for 16bpp
framebuffer only.

Change-Id: I678137be34b6828a85c95065919239ece98533c2
CRs-fixed: 430199
SF:Use the isUpdatingFB method to count copybit layers

Based upon the count of mNumFBLayers SF will call the drawWormHole
method to clear the regions in case of overlay targets.

Change-Id: Ib61f0f0449dfe5884cd32108aee8714b2c43c8fe