Squashed commit of the following:

commit 7092a01d462dd3424bd34f890bbdeacb2592431f
Merge: aaf099f ad12007
Author: Dennis Rassmann <showp1984@gmail.com>
Date:   Sun Apr 13 15:58:37 2014 +0200

    Merge remote-tracking branch 'cmmerge/cm-11.0' into updates

    Conflicts:
    	build/phone-xxhdpi-2048-hwui-memory.mk
    	include/gui/BufferQueue.h
    	include/gui/ISurfaceComposer.h
    	include/gui/Surface.h
    	libs/gui/Android.mk
    	libs/gui/Surface.cpp
    	libs/ui/PixelFormat.cpp
    	services/surfaceflinger/Android.mk
    	services/surfaceflinger/DisplayDevice.cpp
    	services/surfaceflinger/DisplayHardware/HWComposer.cpp
    	services/surfaceflinger/Layer.cpp
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

    Change-Id: Ifba9a5ccdacf80ff7506a2bcb7a7856d95d0dfad

commit ad12007d8d9250aaad4f17e3b8705f48f297acd5
Author: Andy Mast <andy@cyngn.com>
Date:   Wed Dec 11 13:41:23 2013 -0800

    New Theme Engine [2/6] CM11 Themes

    See frameworks/base themes commit for full summary.

    [SUMMARY]
    1. Modifies idmap binary to include target APK in filename. Needed so one theme apk can have multi targets.
    2. Allows aapt to be called via installd. Needed to compile resources found in a theme apk's assets folder.

    [IDMAP EXAMPLE]
    OLD: vendor@overlay@overlay.apk@idmap
    NEW: vendor@overlay@overlay.apk@system@app@target.apk@idmap

    [CONTRIBUTORS]
    Andrew Mast <andy@cyngn.com>
    Clark Scheff <clark@cyngn.com>
    Special thanks to Mårten Kongstad and the rest of the Sony team for their work in idmap.

    Change-Id: I0cb15830109ac36780c015e61348c00ec08d24a1

commit bdabd0da4ff4f5b8b8082042bf4add0497d8d244
Author: Mårten Kongstad <marten.kongstad@sonymobile.com>
Date:   Tue Nov 26 10:57:21 2013 +0100

    Runtime resource overlay, iteration 2

    Support any number of overlay packages. Support any target package.

    UPDATED PACKAGE MATCHING
    ------------------------
    In Runtime resource overlay, iteration 1, only a single overlay package
    was considered. Package matching was based on file paths:
    /vendor/overlay/system/framework-res.apk corresponded to
    /system/framework-res.apk. Introduce a more flexible matching scheme
    where any package is an overlay package if its manifest includes

        <overlay targetPackage="com.target.package"/>

    For security reasons, an overlay package must fulfill certain criteria
    to take effect: see below.

    THE IDMAP TOOL AND IDMAP FILES
    ------------------------------
    Idmap files are created by the 'idmap' binary; idmap files must be
    present when loading packages. For the Android system, Zygote calls
    'idmap' as part of the resource pre-loading. For application packages,
    'idmap' is invoked via 'installd' during package installation (similar
    to 'dexopt').

    UPDATED FLOW
    ------------
    The following is an outline of the start-up sequences for the Android
    system and Android apps. Steps marked with '+' are introduced by this
    commit.

    Zygote initialization
       Initial AssetManager object created
    +    idmap --scan creates idmaps for overlays targeting 'android', \
               stores list of overlays in /data/resource-cache/overlays.list
       AssetManager caches framework-res.apk
    +  AssetManager caches overlay packages listed in overlays.list

    Android boot
       New AssetManager's ResTable acquired
         AssetManager re-uses cached framework-res.apk
    +    AssetManager re-uses cached 'android' overlays (if any)

    App boot
       ActivityThread prepares AssetManager to load app.apk
    +  ActivityThread prepares AssetManager to load app overlays (if any)
       New AssetManager's ResTable acquired as per Android boot

    SECURITY
    --------
    Overlay packages are required to be pre-loaded (in /vendor/overlay).
    These packages are trusted by definition. A future iteration of runtime
    resource overlay may add support for downloaded overlays, which would
    likely require target and overlay signatures match for the overlay to
    be trusted.

    LOOKUP PRIORITY
    ---------------
    During resource lookup, packages are sequentially queried to provide a
    best match, given the constraints of the current configuration. If any
    package provide a better match than what has been found so far, it
    replaces the previous match. The target package is always queried last.

    When loading a package with more than one overlay, the order in which
    the overlays are added become significant if several packages overlay
    the same resource.

    Had downloaded overlays been supported, the install time could have been
    used to determine the load order. Regardless, for pre-installed
    overlays, the install time is randomly determined by the order in which
    the Package Manager locates the packages during initial boot. To support
    a well-defined order, pre-installed overlay packages are expected to
    define an additional 'priority' attribute in their <overlay> tags:

        <overlay targetPackage="com.target.package" priority="1234"/>

    Pre-installed overlays are loaded in order of their priority attributes,
    sorted in ascending order.

    Assigning the same priority to several overlays targeting the same base
    package leads to undefined behaviour. It is the responsibility of the
    vendor to avoid this.

    The following example shows the ResTable and PackageGroups after loading
    an application and two overlays. The resource lookup framework will
    query the packages in the order C, B, A.

            +------+------+-     -+------+------+
            | 0x01 |      |  ...  |      | 0x7f |
            +------+------+-     -+------+------+
                |                           |
            "android"                Target package A
                                            |
                           Pre-installed overlay B (priority 1)
                                            |
                           Pre-installed overlay C (priority 2)

    Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e

commit dd0a362b28fd74ccca2e26e455f158c392468ea6
Author: Mårten Kongstad <marten.kongstad@sonymobile.com>
Date:   Tue Nov 26 09:04:11 2013 +0100

    New command line tool 'idmap'

    Introduce a new tool 'idmap' to handle generation and verification of
    idmap files. The tool is modelled on 'dexopt', and is intended to be
    used similarly, notably by 'installd'.
    See cmds/idmap/idmap.cpp for further documentation on 'idmap'.

    Note: this commit is interdependent on a commit in project build/ to add
    'idmap' to PRODUCT_PACKAGES.

    Note: the changes to androidfw are only stubs. The actual implementation
    will be provided in Runtime resource overlay, iteration 2.

    Change-Id: I7131b74ece1e46c8a9c0a31d103e686aa07da2bb

commit de7e518053131d62ff2aac7536c0bc45889942c4
Author: Stephen Smalley <sds@tycho.nsa.gov>
Date:   Fri Feb 7 09:16:46 2014 -0500

    Convert all selinux_android_restorecon and _setfilecon calls to new API.

    libselinux selinux_android_restorecon API is changing to the more
    general interface with flags and dropping the older variants.

    Also get rid of the old, no longer used selinux_android_setfilecon API
    and rename selinux_android_setfilecon2 to it as it is the only API in use.

    Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
    Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>

commit f2337c9cdf1e167a4a383961755392e3dd9aa3c1
Author: Robert Craig <rpcraig@tycho.ncsc.mil>
Date:   Mon Jul 29 09:18:09 2013 -0400

    Proper security labeling of multi-user data directories.

    Add seinfo paramater to appropriate make directory
    functions. This allows proper labeling for multi-user
    scenarios.

    Change-Id: Iaba7c40645bc7b6cc823d613da0c3782acf6ddd5
    Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

commit 794a0ae0b3ab8153df002f095cbc22f47e0b7d05
Author: Stephen Smalley <sds@tycho.nsa.gov>
Date:   Tue Dec 17 16:04:20 2013 -0500

    restorecon /data/media when re-creating it for multi-user upgrade.

    Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0
    Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>

commit efbaaa6fe12d6e0ba255f3f9e426b294c1cbde88
Author: Robert Craig <rpcraig@tycho.ncsc.mil>
Date:   Thu Feb 20 10:25:56 2014 -0500

    Extend installd to support SELinux restorecon function.

    Implement new restorecondata function which will allow
    the relabeling of /data/data and /data/user directories.
    This is needed in the case of certain OTAs. Not every
    boot will apply this relabeling however. Consult change
    I77bf2a0c4c34b1feef6fdf4d6c3bd92dbf32f4a1 for
    clarification on this issue.

    Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f
    Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

commit 84a696e9a5bac1f57be2a11edba118793c39f340
Author: Manoj Kumar AVM <manojavm@codeaurora.org>
Date:   Tue Feb 11 23:12:50 2014 -0800

    sf: Determine if virtual display can use HWC for composition

    For HWC virtual display using V4L2 approach:
    1. HWC virtual display implementation doesn't send output buffer
       back to Surface Flinger.
    2. For non-wfd virtual displays(e.g. Simulated Secondary Displays,
       Screen Record, CTS etc..), configure VDS to use GPU for
       composition on output/sink buffer.
    3. For wfd virtual display (a.k.a hybrid wfd), use
       Framebuffer surface (similar to external display mechanism).

    For HWC virtual display using VDS approach:
    1. HWC is allocated for first virtual display connection.
    2. Subsequent virtual display sessions will be composed by GLES driver.
    ToDo: Modify VDS component to allocate hwcDisplayId based on
    mForceHwcCopy (which is based on Usage Flags)

    Change-Id: Ib7d2c00ca5fa07908b2eac8085654f8d2cd9af0b

commit e004890ad5c9ef9497ff82fd5fc8468aaa4e1ef9
Author: radhakrishna <radhakrishna@codeaurora.org>
Date:   Fri Feb 21 10:01:08 2014 +0530

    SF: Fix invalid reduction of transparent region from a layer.

    Reduce transparent region from a layer only if the transparent
    region has valid intersection with the layer. Otherwise, reducing
    a transparent region lying completely outside of the layer leads to
    invalid sourcecrop values for the layer.

    Change-Id: Iee9ba53a8072c21c9ba8a6d58cb14ca30f8600ba
    CRs-Fixed: 620973

commit 8124b181d4b5a3a44796fdb0e3ea4e4171f102c7
Author: Kyrylo Mikos <kiril.mik.os@gmail.com>
Date:   Wed Feb 19 17:04:31 2014 +0200

    [2/2] Speed up booting on multicore devices.

    Add multithreading support.

    Change-Id: I13630de9d75d13c0368d261b3564b787067b65b1

commit f2f564513ff98e9eb5aae51182474a3e40bf6b3b
Author: Flamefire <alex@grundis.de>
Date:   Wed Jan 22 00:53:06 2014 +0100

    Do not just silently fail if surface creation fails

    Some apps do not check if they actually got a surface (e.g. bootanimation)
    So this helps the track crashes down to the cause.

    Change-Id: I6e74bdb52ad7ebe260b0ec1777c585781f6bbd42

commit 5e9e33ac72e608d584b13bea176f8fc7f30d88e7
Author: Steve Kondik <shade@chemlab.org>
Date:   Mon Feb 24 15:56:55 2014 +0100

    surfaceflinger: Conditional compilation for swaprect feature

     * Since this now calls into the HAL, we can only support it on
       devices which use the new version.

    Change-Id: I231d70ac3d17fd2198f3929057c1edb0f158c099

commit 9cd6e7d49eeb0846351ae69f506f816d18b9e167
Author: Naseer Ahmed <naseer@codeaurora.org>
Date:   Thu Feb 6 14:04:33 2014 -0500

    Revert "Add sessionId metadata with every buffer queued through Surface"

    This reverts commit 85743373ed7d4eb6cb58412bda6c74f9ee29f06f.
    This change is no longer needed

    Change-Id: Ia5612b42f081236db65ac8eef9d359dfd23f4117

commit 835f0ad6da60ad5cd5f8d6d872c5665aae6f5584
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Fri Jan 10 11:27:05 2014 +0530

    Display: Define new composition type for blit composition

    This change defines a new flag 'hasBlitComp' to identify
    blit composition. This flag is used to enable the swap rect
    feature for blit composition cases.

    Change-Id: Ic523e19796a893efbfc3bff300d1f982cba5ddfa

commit 51dbd89aac2e064cfa1366f32ed75d3b5b9ff061
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Wed Dec 19 18:10:46 2012 -0800

    SurfaceFlinger: Change to support framebuffer flip for 2D blitters

    - Surfaceflinger does not flip framebuffers when there are
      no layers marked for HWC_FRAMEBUFFER
    - This change checks for the HWC_BLIT flag and will request a flip
      to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

    Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c

commit 4fd75c0a371d4ee04e0f583d790b576494257ea8
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Thu Nov 28 19:21:09 2013 +0530

    SF: Add flag for swaprect status in HAL

    We need to check in HAL whether swap rect
    is enable or disable to calculate wormhole region.

    Change-Id: I4fbff4119856e41694e2065141b40fdd7a15f375

commit 0438f810c7e8e3c53850874c7bdb74ac43b2ec88
Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Feb 18 21:18:05 2014 -0800

    sf: Enable swaprect optimization by default only on QCOMs

     * This is confirmed to cause problems at least on i9500.
     * Only enable it by default on QCOMs, other devices can opt
       in using the system property.

    Change-Id: Ic00137201f4a5383877f4033473c1ea5ac32a3a7

commit 9b5ef3793b6012e979c10e4cc9a7e091092a4a57
Author: Sanjeev Jakkilinki <sanjeevj@codeaurora.org>
Date:   Mon Nov 25 18:30:13 2013 +0530

    Display: Add swaprect feature for MDP composition.

    Add swaprect feature for MDP composition.
    SwapRect is a SurfaceFlinger feature for selective composition
    of only thedirty region.
    * Existing SF does copying of the complete layer for every
     layer (in effect the full screen) whether or not the layer's
     information has changed (dirty region).
    This is very inefficient use of compositing hardware (MDP/GPU).
    * At the app level, we're doing dirty region rendering (App only
    renders what is changed) using the feature "Dirty Region Rendering".
    So, at the app level we know what has changed (dirty region) per
     layer. But SurfaceFlinger doesn't know this info and hence it's
     not able to use dirty region for selective composition and ends up
     compositing full screen.
    * For SurfaceFlinger to composite only the dirty region
       1. It needs to know the dirty region (This needs to be passed
          down from the app)
       2. It needs to pass this info to the actual compositing hardware
         (MDP / GPU) so that the hw can do selective composition
    * SWAPRECT feature needs to implement 1 & 2.
    * 1 is common for all composition types whereas 2 is different
     for each composition type
    This change implements 2 for MDP composition
    * We've also added strong checks in the feature to make sure the
     feature kicks in only for the UX scenario's where performance
     improvement is expected and no functionality issue would arise.
    To enable MDP Swaprect, setprop debug.sf.swaprect 1 and restart
    framework.

    Change-Id: Iac67acffcd4de1413cdbe0f15a278cc2cd54206f

commit edcb20627cbaa2b80a65f532950948087c18a4b8
Author: Ranjith Kagathi Ananda <ranjith@codeaurora.org>
Date:   Thu Nov 21 19:55:54 2013 -0800

    Add sessionId metadata with every buffer queued through Surface

    Add sessionId metadata to identify the buffers to be belonging to a
    single video session

    Change-Id: Ic26cf1d7fdead1c38c0f43e562b7878663d7291c

commit 4bcf71c4c88ce2cea8c27e488e42e45d8c0c9c6e
Author: Ethan Chen <intervigil@gmail.com>
Date:   Wed Sep 25 15:44:47 2013 -0700

    binder: update MemoryHeapIon

    * Update from ODROID-XU 09232013 BSP release

    Change-Id: I5245c8a9f783e8902bf91a0ee23e60ebeb335b27

commit 149007998be338900cc2c56a4c81f865b1db6f2e
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Tue Jan 7 14:17:52 2014 +0530

    SF: Block gpu rendering for virtual display widevine level3

    In MPD3 we are using the widevine level3 for secure content
    display. And this should applicable only for primary display
    not for screen shot or screen recording.

    CRs-Fixed: 595469
    Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc

commit a8669f441f23cc74b17da4a9de305d2db9b307a3
Author: Manoj Kumar AVM <manojavm@codeaurora.org>
Date:   Fri Nov 8 13:41:59 2013 -0800

    libgui: Add native window attributes to query usage

    This is required to enable GL libraries to query usage
    native window attributes to enable/disable tile rendering.

    Change-Id: If752fa26ac3d8ffd7776cc5a16fe162af0742df5

commit 21634df92129decfa5c9afa6a9e7adbfeb428a8d
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Jan 11 05:53:41 2014 +0000

    sensorservice: Set the rate for pre-1.1 HALs _after_ activation

    We want to be sure these are applied in the same sequence they
    used to be...

    Change-Id: Ied2ba08ed3c4bed3a80bac6ab5471fcea9ba2c09

commit 2798719f8ed759804448fd78450ab210428db9eb
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jan 6 03:15:33 2014 +0000

    sf: Don't do premultiplied alpha blending on the statusbar for hwc <= 0.3

    Blending the translucent statusbar with the limited alpha implementation
    of older HWC versions is glitch-prone, so don't do that with the compositor
    at all

    Change-Id: I96b49823b837a5063960d39c0937caea8bb3116a

commit ff7096a03ec4db9b28e5a858019374c61d80e04c
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jan 6 01:11:40 2014 +0000

    sf: Fix detection of 0.3 hwcomposer

    The format was different, so look at the header bits too...

    Change-Id: Ibc3d4c9f6bca74d6951041f92e2ecc6189e58c41

commit b64092877e75968e9dc7d629e4169c3ba16bf630
Author: Lingyun Zhu <lingyun.zhu@intel.com>
Date:   Tue Nov 20 19:24:35 2012 +0800

    Graphics:Add error check when create GraphicBuffer

    Change-Id: Ib0ca59bf1dfe4ae0266c29c91c1dbe3d02c0904e
    Author: Lingyun Zhu <lingyun.zhu@intel.com>
    Signed-off-by: Lingyun Zhu <lingyun.zhu@intel.com>
    Signed-off-by: Shuo Gao <shuo.gao@intel.com>
    Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
    Signed-off-by: Jack Ren <jack.ren@intel.com>
    Author-tracking-BZ: 50141

commit ed579d8be17fb52ef92a1dc9c83843879f396fa1
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jan 4 12:12:00 2014 -0800

    Update HWUI config for xxhdpi/2GB devices

    Change-Id: Ic9ba16b0360f2b755a1d23aa51eddc61beee2bac

commit 8f3691ec4ddb10e460104f776345baae6bc76247
Author: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Date:   Tue Dec 17 19:55:17 2013 +0530

    SF: Avoid wormhole clear for BLIT calls

    Do not call GPU clear from SF when composition
    type is BLIT as it'll be taken care in HAL.

    Change-Id: Ia613eb9b824c6484ecc8c8fa4ee883545d8541b8

commit 8f0906507f93ca2dfe9133ada132ce3beaca4e03
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Jan 4 04:44:47 2014 +0000

    surfaceflinger: Consolidate display orientation compensation hooks

    Dedupe rotation calculation code and make rotation a statically
    available property in the DisplayDevice
    Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62

commit 3e92eef1e372e6d22fd995c5944a499bc5b7ddff
Merge: af9660a e41d2e6
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Jan 4 00:31:56 2014 +0000

    Merge "Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270" into cm-11.0

commit af9660a3f4cca7f952a8d662d64f9419e2a085a0
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Dec 30 17:02:07 2013 +0000

    surfaceflinger: Apply bugfixes to the correct hwc code paths

    Changes I2deaf2ed101e8ea76708862a6bb67751b6078794 and
    I1cb44389a05c9ec049d7f0d39c288feccb11a91c, both meant to deal
    with corner-case layer states, were mistakenly merged into
    the pre-1.0-hwc code paths. Move them to their intended locations

    Change-Id: Idd6b3513cc36dda21b552eee97f9ea91793df18f

commit e41d2e603691cf5c5dcbc98f255d90024c7785f7
Author: Clyde Tan <bokbokan@yahoo.com>
Date:   Mon Dec 30 08:49:51 2013 +0800

    Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270

    Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531

commit 9934fc61a9fef3cac7551fe3cfc9b3000e33568a
Author: Tom Briden <tom@decompile.me.uk>
Date:   Fri Sep 6 13:53:16 2013 +0100

    surfaceflinger: don't handle EVENT_ORIENTATION when !HWC_DEVICE_API_VERSION_1_0

    a184463 causes segfault on boot for the enrc2b (and probably others), this fixes it.

    Change-Id: Ic4a7a05b44c8cc44a0d25c56def4acdf5b0939df

commit f7b066c611a44577346c94b8cd09756e208f17fb
Merge: 4f089f8 01ccf4d
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Dec 27 22:21:00 2013 +0000

    Merge "libgui: Bring back support for mHeap-based screenshots" into cm-11.0

commit 4f089f8886cf1d9ef5e88a8d471d8785adf6365e
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Wed Dec 19 18:10:46 2012 -0800

    SurfaceFlinger: Change to support framebuffer flip for 2D blitters

    - Surfaceflinger does not flip framebuffers when there are
      no layers marked for HWC_FRAMEBUFFER
    - This change checks for the HWC_BLIT flag and will request a flip
      to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

    Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c

commit a0fc6ceaa65233a04f4b77833817cc186b8871ef
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Wed Nov 20 17:02:47 2013 -0800

    SurfaceFlinger: Enable Vsync trace for SF Composition

    Enable traces to show s/w vsync which is used for composition
    by surfaceflinger, this helps in identifying the start of
    composition cycle in systrace

    Change-Id: Id892ca03bacd9f0cfe5ca2c3f8bb5aa892b37231

commit 64de490b93631f8f8d81759aa43f9ce84114ce6b
Author: Praveena Pachipulusu <pveena@codeaurora.org>
Date:   Thu Nov 21 18:57:31 2013 +0530

    SurfaceFlinger: Add NULL check for buffer handling

    Add buffer handling NULL check in dequeueBuffer and
    verify whether the output data from binder is not NULL
    in queueBuffer and connect api's to avoid SF crash

    CRs-Fixed: 573088
    CRs-Fixed: 572315

    Change-Id: I41cebbc0cbcbbb0fd5ecb38db7ec7b0c91cdffe9

commit 6ec0352805cde84f8148f7f51201ee1da79643be
Author: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Date:   Fri Aug 30 18:37:55 2013 -0700

    frameworks/native: Add support for Secure Display

    - Add secure UI layers to primary and remove other layers from
      internal and external list for Secure Display usecase.
    - Dont let secure UI layers to be captured on screen

    Change-Id: Iebdad5c56247308604ee90928f6d6460a1f69279

commit ee9ae7b8507db1dd551144c80e3948eef0b2b194
Author: Baldev Sahu <bsahu@codeaurora.org>
Date:   Tue Nov 26 17:39:43 2013 +0530

    libs/ui: Fix crash issue because of null pointer access

    - handle NULL check is required while flatten GraphicsBuffer

    CRs-fixed: 579102

    Change-Id: I292b4b25dc1f5320378cc9e4affbad326e1fdaed

commit 01ccf4d445f13b47d9425301415765e9ce38b63e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Tue Aug 6 16:11:06 2013 +0100

    libgui: Bring back support for mHeap-based screenshots

    Older graphics libraries throw a hissy fit when trying to lock
    buffers for Surface-based screenshots, on at least Tegra2/3 and
    Exynos4 hardware.

    This patch depends on the BOARD_USE_MHEAP_SCREENSHOT board flag
    and requires the ro.bq.gpu_to_cpu_unsupported property set to 1
    in order to work.

    Change-Id: I7db955e2cdd120018e349c14290e975788e70ed3

commit 9241b7c63d8528a1d7668e893250b9345a249894
Merge: 13f09bb d018d2e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Dec 19 20:05:45 2013 +0000

    Merge "installd: Invert the default for dexopt-on-cache" into cm-11.0

commit d018d2ecb3ee31bc549e6b43f8e6b5564569d63a
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Dec 18 22:12:08 2013 +0000

    installd: Invert the default for dexopt-on-cache

    The growth of /system apps and total /data space are making this
    device-breaking (insufficient space to dexopt everything to
    /cache), pointless (/data has more than enough room to hold
    the cache), and in some cases, both.
    The default behavior is now the same as mainline Android's: dexopt
    everything to /data. Set dalvik.vm.dexopt-data-only=0 to change
    that and dexopt /system apps to /cache. If you do that, make sure
    your /cache can accomodate double the size of the dex classes in
    system, since in some extreme cases that has been observed during
    dex2oat

    Change-Id: I8c793784af1fa804ccf84b442613d1000c9b7ce4

commit 13f09bb5719cfd35554aefbce06e4474f964b41c
Merge: 8604c8f c3b18f7
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Dec 18 17:09:21 2013 +0000

    Merge "hax: Add back the SURFACE_SKIP_FIRST_DEQUEUE legacy EGL workaround" into cm-11.0

commit 8604c8f164ba4ed3e4fe5e8743165ad82fc5bcde
Merge: d7065ba fe5087b
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Dec 18 17:06:54 2013 +0000

    Merge "Forward-port surface dithering from CM10.2" into cm-11.0

commit d7065ba1fe4e6b76ab1b4f47e9e881ae78cdaa06
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Dec 18 02:43:17 2013 +0000

    BatteryService: Restore the original parcel order

    Append the dock extensions to the end of the parcel to preserve
    compatibility with the original parcel format.

    Change-Id: Ib4fa8473fcab9882d41bd9f9617af163154290ab

commit 4eaaf29ad18af1d796fbbcf90b10bf19250f0ea4
Merge: 747472a 7e97b8c
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Dec 16 16:35:37 2013 +0000

    Merge "Revert "SensorEventQueue: Allow setRate on sensor enable"" into cm-11.0

commit 7e97b8c9b61ec4f3dccfcd620adb943ea73d8e0f
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Dec 16 16:35:13 2013 +0000

    Revert "SensorEventQueue: Allow setRate on sensor enable"

    This reverts commit 320fd662a3cf98c920fb9b2ae05e34c7ee3e623d. It's the wrong fix for the wrong problem. The main issue on
    devices like the JF is the presence of a new method (flush) in the 1.1
    sensor API, which can't be invoked in older blobs and should
    be addressed in the sensorservice itself.

    Change-Id: I2f5fff41db7a11ed2e0f6650d1f1cecb5e2a03fb

commit 747472a354ce30823244ca130cc39b91fe684843
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Dec 15 18:12:17 2013 +0000

    sensorservice: Fix init sequence for pre-1.1 API sensor HALs

    The sensors API introduced a new flush() method that older binaries
    won't have. For those, replace the firstFlush invocation with a
    setDelay call since a lot of implementations interpreted that as
    the initialization step.
    We also don't want any kind of call to flush() to happen when it
    isn't there, since it'll either hit a random OEM extension or
    a memory address we really don't want to execute.

    Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620

commit fe5087b385f71e8bb82db0bd2a89e6e7508ca8d7
Author: Steven Luo <steven@steven676.net>
Date:   Sat Dec 14 16:03:15 2013 -0800

    Forward-port surface dithering from CM10.2

    This allows the use of 16-bit color displays without excessive color
    banding;

    Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0

commit b245ffb9bff2340df26c86f8a4faba69b61d7acd
Author: Jorge Ruesga <jorge@ruesga.com>
Date:   Tue Dec 3 01:32:08 2013 +0100

    native: Add dock battery support

    Dock battery patchset chain:
    base: http://review.cyanogenmod.org/#/c/55349/
    native: http://review.cyanogenmod.org/#/c/55028/
    healthd: http://review.cyanogenmod.org/#/c/55029/
    settings: http://review.cyanogenmod.org/#/c/55212/
    tf700t: http://review.cyanogenmod.org/#/c/55030/

    Video (battery styles): https://www.dropbox.com/s/a7dp3glb7lv1zcg/dock_sdcard01.mp4
    Screenshots:
     * No dock: https://www.dropbox.com/s/2yvngdaqok32xiz/dock_sdcard01.png?m=
     * No charging: https://www.dropbox.com/s/ezghtgoedei17oj/dock_sdcard02.png?m=
     * Docked no charging: https://www.dropbox.com/s/7fasc05fw5ylfxi/dock_sdcard03.png?m=
     * Docked charging: https://www.dropbox.com/s/x37vrhxzd075f7p/dock_sdcard04.png?m=

    Change-Id: I5f1431736cd6d6d2f6c593881323d3efb5db6b3f
    Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

commit c3b18f73fd7ff58794f39ad36a49c7bce996967c
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Aug 7 00:08:44 2013 +0100

    hax: Add back the SURFACE_SKIP_FIRST_DEQUEUE legacy EGL workaround

    Set BOARD_EGL_SKIP_FIRST_DEQUEUE to use

    Change-Id: I46257a7e9e6b6e093a5cb92eaaaef4bdd0435a12

commit 78273119ee97f4285fa9407ddcbb9fcf2b7672b4
Author: Hashcode <hashcode0f@gmail.com>
Date:   Sun Dec 8 19:36:50 2013 +0000

    sf: Always use opengles for screen capture

    Go back to the usage of GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
    in captureScreenImplLocked regardless of useReadPixels value

    This fixes the EGL_NO_IMAGE_KHR error returned from
    eglCreateImageKHR (blank images returned from screenshot path)

    Change-Id: I62fe90a081607b9e89c67f3dcfd34c84efc89d35

commit 718f3c2e903afbae64f5b5b429bcd03601219538
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Dec 8 19:34:24 2013 +0000

    Revert "add BoardConfig flag TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE"

    This reverts commit db66fbf4acbe098dc52534378ed33694a63f3ffd.
    Turns out the test results in the GN were skewed by another bug. We _can_ just remove the useReadPixels check and do away with the need for a board flag

    Change-Id: I084e7bbf4c2435b9656fa30e7ce130237b7f57c5

commit 753e3c84e1587306ad0a5e353475ecc1ce76ce18
Merge: 2b38f72 2c4c335
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Dec 6 23:15:53 2013 +0000

    Merge commit '4.4.1_r1' into HEAD

commit 2b38f723359c039a764a5014b442351a1f8d1027
Merge: a9a96ef db66fbf
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Dec 6 19:51:17 2013 +0000

    Merge "add BoardConfig flag TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE" into cm-11.0

commit 2c4c33543d2702c7e4647695c833508e63138a8c
Merge: a9a96ef 14e8b01
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Dec 6 04:26:42 2013 +0000

    Merge tag 'android-4.4.1_r1' into HEAD

    Android 4.4.1 Release 1

commit a9a96ef25bb350e92caed20981d025f8cb050830
Merge: 92d3d27 58ce040
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Dec 5 02:51:35 2013 +0000

    Merge "Revert "Sensor: Add RotationVectorSensor2"" into cm-11.0

commit 92d3d27d9a9d0c853a82fba9f86dcb19ac9f4888
Author: Naseer Ahmed <naseer@codeaurora.org>
Date:   Tue Nov 19 14:11:26 2013 -0500

    surfaceflinger: Set max acquired buffer count

    If triple framebuffers are enabled, the number of acquired
    buffers isn't increased by default. Set the count to one less
    than the max buffers to make sure all three buffers come into
    play.

    Change-Id: I65054ed4004607f5be68c893f6f621e821cfbf1c

commit 79401f6ce898c7078df75cb89a314d5bd3e551c1
Author: Anshuman Dani <adani@codeaurora.org>
Date:   Tue Nov 5 21:04:00 2013 +0530

    GlES2: Add NULL check

    Check for NULL before calling thread specific glGetString.

    CRs-fixed: 569609

    Change-Id: Ifee8257152ba7ca7a05df5d7b113171b71d16c82

commit 320fd662a3cf98c920fb9b2ae05e34c7ee3e623d
Author: Andrew Dodd <atd7@cornell.edu>
Date:   Sun Nov 24 15:08:59 2013 -0500

    SensorEventQueue: Allow setRate on sensor enable

    4.3 and earlier would set the sensor rate on activation and then set it again
    when setRate was called.

    Some sensor HALs assume this will happen and ignore the first setRate

    Conditionally the first one back in for such broken HALs

    Change-Id: If1c259b0fd5517a1272cdad0a1abf1fe0fb5a7d1

commit db66fbf4acbe098dc52534378ed33694a63f3ffd
Author: Hashcode <hashcode0f@gmail.com>
Date:   Mon Nov 25 01:18:46 2013 -0800

    add BoardConfig flag TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE

    This flag forces usage flags:
    GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
    in captureScreenImplLocked regardless of useReadPixels value

    This fixes the EGL_NO_IMAGE_KHR error returned from
    eglCreateImageKHR (blank images returned from screenshot path)

    Change-Id: Ia782a918501b4fd40a58eef71c404584a44b8073

commit 38deda9d98bc711a786bd654bd4cf6d8c2e1bbdf
Author: Omprakash Dhyade <odhyade@codeaurora.org>
Date:   Thu Aug 9 19:00:37 2012 -0700

    frameworks/native: fix copy back dirty region

    Copyback dirty region logic does copyback,
    even when its not necessary causing 2ms delay.
    Fix the logic to copy back only what is necessary.

    Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773

commit 58ce0401ba99c1fc21a5b7b3336f544a8b1da55e
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Wed Nov 20 09:15:33 2013 +0700

    Revert "Sensor: Add RotationVectorSensor2"

    The implementation does not work as-is and the latest version of
    Google Maps no longer needs it.

    This reverts commit 45c5aa0ce71904ad8b00d5eba0627770b35b03ab.

    Change-Id: I89b3730e93eb774dc2b9dace645d08cbfb311647

commit 2025c3683a2f12163bdf62825def9d433fe6223e
Merge: f10bbe5 b92d63d
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Nov 16 16:17:00 2013 +0000

    Merge "Allow building against other qcom display HALs" into cm-11.0

commit f10bbe59ce30d4ecd2c76f9f9be65872406968bb
Merge: 1d98c0f 24c241f
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Nov 14 20:25:56 2013 +0000

    Merge "binder: add compat symbol" into cm-11.0

commit 1d98c0fb79b8f5f7bdfbf19242b4cc41fa60c195
Author: Jorge Ruesga <jorge@ruesga.com>
Date:   Fri Nov 8 04:27:51 2013 +0100

    frameworks_native: Add back PixelFormatInfo

    Change-Id: I7a8d864686fc2574b26734428383d9a9f102365f
    Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

commit 24c241fa738f47c8ef76be52feeafce3c69959bf
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Thu Nov 14 15:19:46 2013 +0700

    binder: add compat symbol

    Required for older Samsung libtvout

    Change-Id: Ib18d2513570382432d49f302ab041230650372f2

commit b92d63dfbd9a0181bc5b819518de84786b364c62
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Wed Nov 13 10:33:15 2013 -0600

    Allow building against other qcom display HALs

    * also fix normal pathing to use the new aosp paths

    Change-Id: I26ca3f28f950e82130ba51b4408234d06703d044

commit 34350c89c09ffbd34978fcb513f226475248d83b
Merge: 509e43d 622d165
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Tue Nov 12 02:50:42 2013 +0000

    Merge remote-tracking branch 'caf-rebase' into cm-11.0

    Change-Id: I7216c277f2f5ebafe349f0849957df8900ca0084

commit 622d1650f35dad2e85df22caa506e38933bf72ed
Author: Arne Coucheron <arco68@gmail.com>
Date:   Fri Nov 8 17:24:50 2013 +0100

    Revert "FM Radio: Add support for FM Radio in Android"

    This reverts commit 27f431cbf8a325c5e32a815fb26e70e7591d318a.

    Change-Id: Icf7a8e021ac0bc3f3cfba77ad0dae774bec66afa

commit 0fa7244141397a737a2aac96e07559030e46f546
Author: RonGokhale <cips173@gmail.com>
Date:   Thu Nov 7 14:47:39 2013 +0530

    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: I6f44bcc285d83bcd9c48c42c2d54c874dedc74c7

commit 540345f70db4f0cea6ad3f1150d2cb2fac18da25
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Oct 26 03:43:03 2013 +0100

    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

commit 5f695d3dcf8bcacc1fb1300280dbb38a46069c21
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Oct 31 03:53:39 2013 +0000

    Revert "remove support for glReadPixels screenshot path"

    This reverts commit 3ca76f416bc8665a97636ca8a2d0128b9da9d92c.

commit 49b21043fb8ffe873b84149ef013c0a6df5a6033
Author: Ethan Chen <intervigil@gmail.com>
Date:   Tue Oct 8 15:07:21 2013 -0700

    Add GESTURE_SENSOR input source

    Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783

commit 1b51513fb7fd68fa606d6e252032f869c5a863c3
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Sep 16 22:16:19 2013 +0100

    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

commit e7f8df47fd05c773367fef666c77a76eb4fa4ad8
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:32:51 2013 +0000

    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

commit e02a0d6b5eac79bdb385f374cf165f1108f70d06
Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Aug 6 02:53:19 2013 -0700

    hwui: Update configuration for 2GB/1080p devices

    Change-Id: I73357a35bee22d76d3fe8a98ece91c5c9d19371d

commit 8a126f06714adf5a9d34aa46ed8ad128e601e28e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jul 29 23:45:45 2013 +0100

    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

commit c43aaede912f68b22d76e31b13798e062be75d6b
Author: codeworkx <daniel.hillenbrand@codeworkx.de>
Date:   Fri Dec 30 15:59:44 2011 +0100

    samsung: add support for tvout and yamahaplayer services

    Change-Id: I653f9876b7fb83734abf3a0b9b9b5af1920b8112

commit d6b745abc6b92c37b0d3c6def754b1fb150caf4e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jul 2 17:25:40 2012 +0100

    servicemanager: Allow tegra audio to register as a service

    Change-Id: I6c792b6f5f586cf40d4a9b834e793a68c1e458a7

commit b6ab52eaaa4fd257d1f3fadb97e56cccadfd2a7b
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jun 1 14:51:17 2013 +0200

    provide overrides for hwui memory limits for xxhdpi phones

    Change-Id: I8b369619cd07530d0468a5449da30f338c13c7d2

commit 06376fd3b0409476da00d6d05e4728884f5b6e38
Author: Steve Kondik <shade@chemlab.org>
Date:   Fri May 17 13:10:19 2013 -0700

    Add heap configuration for 1080p phones with 2048m

     * Increase heap start size to 16m to minimize GC with larger bitmaps

    Change-Id: I8fbba2e5a2a2cf2d7a6898ca6bae8639d6cf5a19

commit c42175605fff794f6e39f58ec1129a7dd5f1add8
Author: Andrew Bartholomew <andrewb03@gmail.com>
Date:   Thu Apr 25 13:48:21 2013 -0400

    build/phone-xhdpi-1024-dalvik-heap.mk Revert AOSP heapgrowthlimit change from 64 to 96

    This reverts part of AOSP change at

    https://android.googlesource.com/platform/frameworks/native/+/c84e9844d621223d14178be521

    Possible performance issues have arisen because of it. Discussion at

    http://code.google.com/p/android/issues/detail?id=40961

    Patch Set 2: Clean up commit message

    Change-Id: Id7e3324607f92553a98e4d47da58a322e4fba657

commit e835269aefc750fe537adf7bc202398e98a54dd7
Author: Krylon360 <b.t.walter@gmail.com>
Date:   Thu Aug 9 10:16:20 2012 -0600

    SurfaceFlinger: Removal of NO_RGBX_8888 flag for OMAP3

    Removing this will allow color format of surface to be set for RGBX8888
    that can improve performance for 32 bit framebuffer.

    Tested on Nook Color with CM10
    TI's commit can be found here:
    review.omapzoom.org/#/c/21374/3

    This will also remove the need to have BOARD_NO_RGBX_8888 := true
    in the BoardConfig.mk

    Change-Id: Ibc6e56c992a6433bc8688d88471d4feb9084278c

commit 9d08f2dd8347f1f681f7eb2d8069ebd6f992932a
Author: Chirayu Desai <cdesai@cyanogenmod.org>
Date:   Sat Dec 29 12:56:13 2012 +0530

    SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

    enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

    Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab

commit e493b81f8ea1cfb21123cb1dd051c70d427adfdc
Author: Alin Jerpelea <jerpelea@gmail.com>
Date:   Wed Jan 16 08:00:53 2013 +0200

    FM Radio: Add support for FM Radio in Android

    moved permissions to frameworks/native

    Change-Id: I27ded70f7bc116a1b1c9cff2383c4899afe746ec

commit df9d333a361d72302014495fbe04207dc47e1779
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Jan 2 21:17:44 2013 +0000

    sensordevice: Dummy ALS: Solve fortified libc warning

    convert sprint to snprintf, the size of the writes is always known

    Change-Id: I53ee36b67544ac25de7e5c05ce90b6817c8a9c92

commit 48b64083e8930addefbd8ac9d066870ef42c06c4
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:17:16 2013 +0000

    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

commit a62057ff1c89b7e6346313c6ca3051a167c002d4
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:16:25 2013 +0000

    ui/sf: Add support for exynos HDMI

    Change-Id: I27b34e95c04750e3dd321a2183b6cc1d89f29b5d

    Conflicts:
    	libs/ui/Android.mk
    	services/surfaceflinger/Android.mk
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

commit 14b1f9593ffdb8d1af1b43d63b4a99ce9b420de7
Author: Bumble-Bee <bigbeeshane@gmail.com>
Date:   Thu Nov 29 16:23:07 2012 +0000

    Add setOrientation back

    	this is needed for some tegra ICS and JB_MR0 prebuilts

commit 1ba68705a6049f04cb0180bebdbeb91984a7329b
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 18:53:58 2012 -0400

    dumpstate: Squash fixes from CM 10.0

    commit ba3723de8d13126027706bbbe6f9657da231b9bd
    Author: Mike Kasick <mike@kasick.org>
    Date:   Wed Oct 31 20:31:05 2012 -0400

        dumpstate: Fix calls to su to specify a shell command

        Superuser's su requires that shell commands be specified with the "-c"
        option.  Fix calls to su to explicitly specify this option.

    commit 78cd73fce82fd0b5ee98a6136c847932ba8c636b
    Author: Mike Kasick <mike@kasick.org>
    Date:   Wed Oct 31 18:53:58 2012 -0400

        dumpstate: Skip subsequent showmaps if the first run fails.

        dumpstate takes over six minutes to run as each call to "su" (which
        dumpstate uses opportunistically on states that require root privileges to
        access) takes approximately one second to process.

        The vast majority of these "su" calls are made to "showmap", which is
        called for every running process.  These calls nearly always fail, either
        because dumpstate is denied root access, or because "showmap" isn't
        installed.

        This greatly speeds up the dumpstate process by skipping subsequent
        "showmap" attempts if the first run (on process init) fails.

    Change-Id: Ibdfa996afff541dc30251da7ab01ac4987ae2ebc

commit 8e8f98e26a756bc3a64d2443c3ce68660f78f175
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:14:23 2013 +0000

    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

commit a6252fbc8ece3cb6267e3d397efce853953434d7
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Tue Dec 4 18:51:36 2012 +0100

    binder: Add MemoryHeapBaseIon

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

    Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833

commit a47b652c9570f624af08cf81e264094f6d87086d
Author: Hashcode <hashcode0f@gmail.com>
Date:   Mon Dec 10 16:33:53 2012 -0800

    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>

commit 45c5aa0ce71904ad8b00d5eba0627770b35b03ab
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:09:08 2013 +0000

    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

commit 90d2e9350c44a19c4e1860afff619d8a921cf024
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Mon Dec 3 22:16:56 2012 +0100

    libui: exynos4: apply FIMC usage flag on format HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED

    Change-Id: I8a98e593cb60d0843e83a5e431142410e26d82e7

commit 76cc099346b2247020053e22b8540434e5693a54
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:08:01 2013 +0000

    GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats

    Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768

    Conflicts:
    	libs/ui/GraphicBufferAllocator.cpp

commit 62dcf7b5c07c669a5dcd13a98a134ac61a77d3cf
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:07:35 2013 +0000

    ui: exynos4: getphys is common

    Change-Id: I1dc9c2ced0700072e7c30c8435676873b10c7026

    Conflicts:
    	include/ui/GraphicBufferMapper.h
    	libs/ui/GraphicBufferMapper.cpp

commit 1c60a74ac6b31e09d116e688b008daf9e4c48dc0
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Nov 24 23:11:49 2012 +0000

    surfaceflinger: Reimplement hwrotation

    Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda

commit 7447b2c9c854b94fdbb7d5cb9d2d00b95797d4e2
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Dec 25 17:37:53 2011 +0700

    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

commit d37ad8f60fe31cabb80c251b56099661fcde405e
Author: ctso <ctsoyars@gmail.com>
Date:   Thu Jun 24 02:03:47 2010 +0000

    DexOpt anything on /system in /cache/dalvik-cache

    Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689

    Allow property to disable dexopt on /cache

    Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf

commit 8993f7fee273af6c5d68abbaf280158d5284a2d1
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Nov 26 02:23:06 2012 +0000

    libgui: Add ICS/MR0-compatible client::createSurface constructors

    Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c

commit 669a8ca6b6a4eacdc4f916a1666e0858725a9c71
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Nov 24 22:39:21 2012 +0000

    Revert "Revert "Compatibility work around for bad graphics driver dependency.""

    This reverts commit 38b657265ccc5ae45bd7860a68b0d9373b47a2f3.

    Change-Id: If350d73839f1ed5e01af4299d44837e619d14d66

commit ba20ade49672f9435d3c710383a8acef3f012e06
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Sat Nov 24 14:51:44 2012 +0100

    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

commit 57a3ad8dfe6ced3cd95419cc19cad954b6d3bb19
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:06:55 2013 +0000

    exynos4: getphys implementation on buffermanager for samsung omx

    Change-Id: Iee665f56aaf601479d796703db983ca5fce9c5c3

    Conflicts:
    	include/media/hardware/HardwareAPI.h
    	include/ui/GraphicBufferMapper.h
    	libs/ui/GraphicBufferMapper.cpp

commit 81300f6db9e9753e2f7f25fdb5845facca86439e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Jul 13 23:35:46 2012 +0100

    Revert "get rid of MemoryHeapPmem"

    This reverts commit 7a7524810a0950c1c2b18014a8f1c637275165c4 and
    makes MemoryHeapPmem conditioned to BOARD_NEEDS_MEMORYHEAPPMEM

    Change-Id: I2f38340984ba87d6970d17ec944e3faded4132c8

commit 893311cae3123ce30faed16d2d43f61c2184e544
Author: Bhargav Upperla <bhargavuln@codeaurora.org>
Date:   Thu May 23 12:50:15 2013 -0700

    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

commit e347f3c17da21b662c5a48845e5fbb6c0f9566bb
Author: Mingming Yin <mingming@codeaurora.org>
Date:   Fri Jun 14 17:31:01 2013 -0700

    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

commit 18f51ca57f129ed821c001c132f51406de901a67
Author: dolby <rob.jones@dolby.com>
Date:   Wed May 8 18:08:43 2013 +1000

    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

commit 509e43d8bcc636c5138d6f0e660e75a3dfdd16de
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sat Nov 2 23:02:15 2013 -0700

    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

commit 1ee0c5fab7f26e26abfccf3d83bf04f41409e187
Author: Arne Coucheron <arco68@gmail.com>
Date:   Fri Nov 8 17:24:50 2013 +0100

    Revert "FM Radio: Add support for FM Radio in Android"

    This reverts commit 27f431cbf8a325c5e32a815fb26e70e7591d318a.

    Change-Id: Icf7a8e021ac0bc3f3cfba77ad0dae774bec66afa

commit d6f69ae95b13399260142a43808c6beddcf07888
Author: RonGokhale <cips173@gmail.com>
Date:   Thu Nov 7 14:47:39 2013 +0530

    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: I6f44bcc285d83bcd9c48c42c2d54c874dedc74c7

commit b2150f9339f2749e52faff2dd6e48854c2d41e03
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Oct 26 03:43:03 2013 +0100

    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

commit 4d5f0094cd27ba972910365c8c385c320d4f0ca0
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Oct 31 03:53:39 2013 +0000

    Revert "remove support for glReadPixels screenshot path"

    This reverts commit 3ca76f416bc8665a97636ca8a2d0128b9da9d92c.

commit b510b53f93c43710ce9c5a2e9bba9ee874103f25
Author: Ethan Chen <intervigil@gmail.com>
Date:   Tue Oct 8 15:07:21 2013 -0700

    Add GESTURE_SENSOR input source

    Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783

commit f2acdfef4940adbae00184478255b354b4119711
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Sep 16 22:16:19 2013 +0100

    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

commit 1a25e4f91033ecd9f64cee87218b00c90227443e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:32:51 2013 +0000

    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

commit 386f220e174f9ed5aad487867223033fd5d986c6
Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Aug 6 02:53:19 2013 -0700

    hwui: Update configuration for 2GB/1080p devices

    Change-Id: I73357a35bee22d76d3fe8a98ece91c5c9d19371d

commit 1eb108ed044af60412856df0068e8ce83d91b6f9
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jul 29 23:45:45 2013 +0100

    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

commit 279a75aac3e3640ed0ddea50e15dc5461e593636
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Jul 25 17:52:16 2013 +0100

    surfaceflinger: Update support for hwc < 1.0

    Add android::HWCLayerVersion0 implementations of the new methods

    Change-Id: Ic199c9b4262049b74632a57ad2b2cdf462a05b43

commit 61ccf1502f0a11869b18c553edc5ba99d2656644
Author: codeworkx <daniel.hillenbrand@codeworkx.de>
Date:   Fri Dec 30 15:59:44 2011 +0100

    samsung: add support for tvout and yamahaplayer services

    Change-Id: I653f9876b7fb83734abf3a0b9b9b5af1920b8112

commit 8c84fcb34dec892e7756ff638d88d60d3db64daf
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Jul 2 17:25:40 2012 +0100

    servicemanager: Allow tegra audio to register as a service

    Change-Id: I6c792b6f5f586cf40d4a9b834e793a68c1e458a7

commit b7392d113d8ae6c3c07990bbb3f2621bef490d11
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jun 1 14:51:17 2013 +0200

    provide overrides for hwui memory limits for xxhdpi phones

    Change-Id: I8b369619cd07530d0468a5449da30f338c13c7d2

commit 247b3c635b1d6776ffedf3cd61a936546c2f6603
Author: Steve Kondik <shade@chemlab.org>
Date:   Fri May 17 13:10:19 2013 -0700

    Add heap configuration for 1080p phones with 2048m

     * Increase heap start size to 16m to minimize GC with larger bitmaps

    Change-Id: I8fbba2e5a2a2cf2d7a6898ca6bae8639d6cf5a19

commit 9856e93970fd6def1349e564f17d42f505904eba
Author: Andrew Bartholomew <andrewb03@gmail.com>
Date:   Thu Apr 25 13:48:21 2013 -0400

    build/phone-xhdpi-1024-dalvik-heap.mk Revert AOSP heapgrowthlimit change from 64 to 96

    This reverts part of AOSP change at

    https://android.googlesource.com/platform/frameworks/native/+/c84e9844d621223d14178be521

    Possible performance issues have arisen because of it. Discussion at

    http://code.google.com/p/android/issues/detail?id=40961

    Patch Set 2: Clean up commit message

    Change-Id: Id7e3324607f92553a98e4d47da58a322e4fba657

commit 5a61a9a16ebd4a8f5671717b2514fb154f2e5b40
Author: Krylon360 <b.t.walter@gmail.com>
Date:   Thu Aug 9 10:16:20 2012 -0600

    SurfaceFlinger: Removal of NO_RGBX_8888 flag for OMAP3

    Removing this will allow color format of surface to be set for RGBX8888
    that can improve performance for 32 bit framebuffer.

    Tested on Nook Color with CM10
    TI's commit can be found here:
    review.omapzoom.org/#/c/21374/3

    This will also remove the need to have BOARD_NO_RGBX_8888 := true
    in the BoardConfig.mk

    Change-Id: Ibc6e56c992a6433bc8688d88471d4feb9084278c

commit a11d2fd9d92cf4654bce2bcd9b9a786395f4e95f
Author: Chirayu Desai <cdesai@cyanogenmod.org>
Date:   Sat Dec 29 12:56:13 2012 +0530

    SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

    enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

    Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab

commit 27f431cbf8a325c5e32a815fb26e70e7591d318a
Author: Alin Jerpelea <jerpelea@gmail.com>
Date:   Wed Jan 16 08:00:53 2013 +0200

    FM Radio: Add support for FM Radio in Android

    moved permissions to frameworks/native

    Change-Id: I27ded70f7bc116a1b1c9cff2383c4899afe746ec

commit e214f7c5d70bea7767b10122eb8df7fa032f94ae
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Wed Jan 2 21:17:44 2013 +0000

    sensordevice: Dummy ALS: Solve fortified libc warning

    convert sprint to snprintf, the size of the writes is always known

    Change-Id: I53ee36b67544ac25de7e5c05ce90b6817c8a9c92

commit ce4876a9387a9b9b93b32ca8e736dc67bbeda466
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:17:16 2013 +0000

    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

commit 64b604bdccbe13f6a4b50ecd7f8c55fec8f0834e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:16:25 2013 +0000

    ui/sf: Add support for exynos HDMI

    Change-Id: I27b34e95c04750e3dd321a2183b6cc1d89f29b5d

    Conflicts:
    	libs/ui/Android.mk
    	services/surfaceflinger/Android.mk
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

commit 833eb91c35519a85f881f9eb00d2454e70f23946
Author: Bumble-Bee <bigbeeshane@gmail.com>
Date:   Thu Nov 29 16:23:07 2012 +0000

    Add setOrientation back

    	this is needed for some tegra ICS and JB_MR0 prebuilts

commit 1083d5ada8fd1e81a4c3e08b1b087002423d1695
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 18:53:58 2012 -0400

    dumpstate: Squash fixes from CM 10.0

    commit ba3723de8d13126027706bbbe6f9657da231b9bd
    Author: Mike Kasick <mike@kasick.org>
    Date:   Wed Oct 31 20:31:05 2012 -0400

        dumpstate: Fix calls to su to specify a shell command

        Superuser's su requires that shell commands be specified with the "-c"
        option.  Fix calls to su to explicitly specify this option.

    commit 78cd73fce82fd0b5ee98a6136c847932ba8c636b
    Author: Mike Kasick <mike@kasick.org>
    Date:   Wed Oct 31 18:53:58 2012 -0400

        dumpstate: Skip subsequent showmaps if the first run fails.

        dumpstate takes over six minutes to run as each call to "su" (which
        dumpstate uses opportunistically on states that require root privileges to
        access) takes approximately one second to process.

        The vast majority of these "su" calls are made to "showmap", which is
        called for every running process.  These calls nearly always fail, either
        because dumpstate is denied root access, or because "showmap" isn't
        installed.

        This greatly speeds up the dumpstate process by skipping subsequent
        "showmap" attempts if the first run (on process init) fails.

    Change-Id: Ibdfa996afff541dc30251da7ab01ac4987ae2ebc

commit 1020d17b580e0804b3baabee714a914deddbefbd
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:14:23 2013 +0000

    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

commit 5fbf4fbd167cbebdf9f05c3e6d62fc5a7c1e5f4e
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Tue Dec 4 18:51:36 2012 +0100

    binder: Add MemoryHeapBaseIon

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

    Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833

commit 4ab1691d9a4c7d2b94a28e9b6e84f5a7ca317459
Author: Hashcode <hashcode0f@gmail.com>
Date:   Mon Dec 10 16:33:53 2012 -0800

    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>

commit beb3f6033d60f0ed8588fdbf2e39208d75315b5c
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:09:08 2013 +0000

    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

commit bdc326c524ad83e6556892e5f02db893bc32c114
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Mon Dec 3 22:16:56 2012 +0100

    libui: exynos4: apply FIMC usage flag on format HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED

    Change-Id: I8a98e593cb60d0843e83a5e431142410e26d82e7

commit f648eabf5b6dbc59f35cef30ae0999746bbbb62e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:08:01 2013 +0000

    GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats

    Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768

    Conflicts:
    	libs/ui/GraphicBufferAllocator.cpp

commit 911bd8c6e99d063ace29c0cd3c48491896b55877
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:07:35 2013 +0000

    ui: exynos4: getphys is common

    Change-Id: I1dc9c2ced0700072e7c30c8435676873b10c7026

    Conflicts:
    	include/ui/GraphicBufferMapper.h
    	libs/ui/GraphicBufferMapper.cpp

commit 068670405e1e1f67802709dac0abf9cf2bd87f2e
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Nov 24 23:11:49 2012 +0000

    surfaceflinger: Reimplement hwrotation

    Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda

commit 993b066366b2065c4b9de491f386c585207d4e02
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Dec 25 17:37:53 2011 +0700

    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

commit 4ff8448cc41eea749e59b316e456777b3d9ca1ed
Author: ctso <ctsoyars@gmail.com>
Date:   Thu Jun 24 02:03:47 2010 +0000

    DexOpt anything on /system in /cache/dalvik-cache

    Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689

    Allow property to disable dexopt on /cache

    Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf

commit e47c89732c327c0ae907b84cc75a284c446cd702
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Nov 26 02:23:06 2012 +0000

    libgui: Add ICS/MR0-compatible client::createSurface constructors

    Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c

commit 5247f8435efd7155b481939deeb74ad1be7069ba
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sat Nov 24 22:39:21 2012 +0000

    Revert "Revert "Compatibility work around for bad graphics driver dependency.""

    This reverts commit 38b657265ccc5ae45bd7860a68b0d9373b47a2f3.

    Change-Id: If350d73839f1ed5e01af4299d44837e619d14d66

commit be32f55436ddd3b934083f78f1d5a2f771fa3f59
Author: codeworkx <codeworkx@cyanogenmod.org>
Date:   Sat Nov 24 14:51:44 2012 +0100

    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

commit 6aeeb9276d607ba4d44e59b6b454c8c61b164000
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Sun Nov 3 03:06:55 2013 +0000

    exynos4: getphys implementation on buffermanager for samsung omx

    Change-Id: Iee665f56aaf601479d796703db983ca5fce9c5c3

    Conflicts:
    	include/media/hardware/HardwareAPI.h
    	include/ui/GraphicBufferMapper.h
    	libs/ui/GraphicBufferMapper.cpp

commit 89e202eecd0a572742b33209c693b38237fbcc12
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Fri Jul 13 23:35:46 2012 +0100

    Revert "get rid of MemoryHeapPmem"

    This reverts commit 7a7524810a0950c1c2b18014a8f1c637275165c4 and
    makes MemoryHeapPmem conditioned to BOARD_NEEDS_MEMORYHEAPPMEM

    Change-Id: I2f38340984ba87d6970d17ec944e3faded4132c8

commit bd7fb4be323f6f868a886b22e93cf203944af9a6
Author: Bhargav Upperla <bhargavuln@codeaurora.org>
Date:   Thu May 23 12:50:15 2013 -0700

    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

commit 43a18b243fb9911c9fb0984ca3a7f0ca8cb705b1
Author: Rakesh Pallerla <rakesh@codeaurora.org>
Date:   Thu Jun 6 16:35:06 2013 +0530

    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

commit fedb5293c66ca9b551f4cf974b3e977e97eb8d90
Author: Mingming Yin <mingming@codeaurora.org>
Date:   Fri Jun 14 17:31:01 2013 -0700

    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

commit f33b7cd6d3e53b6294abafc09a523e8bca0470e4
Author: dolby <rob.jones@dolby.com>
Date:   Wed May 8 18:08:43 2013 +1000

    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

commit 4876ced97133be6a9a10ff26f6593e28503b43c3
Author: Wei Wang <wangw@codeaurora.org>
Date:   Wed Jan 23 15:19:02 2013 -0800

    GC triggering performance optimizations

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

    Change-Id: Ia2b158aa28254d88f68c9534a0eef580aa811b10

commit 7e9316b590c706e107018f33589e8b23eac1443d
Author: Justin Philip <jphili@codeaurora.org>
Date:   Wed Oct 30 11:37:04 2013 +0530

    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

commit c3781a620096615f3018bc95393fc573a074e23f
Author: Rakesh Pallerla <rakesh@codeaurora.org>
Date:   Thu Jun 6 16:35:06 2013 +0530

    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
    (cherry picked from commit 459e79cb0deedcae04f1779c2f79e68d6dc4c3cc)
    (cherry picked from commit 8749fe5b55743fccf1aaed9e400447890e8dda82)

commit ec96c171cd80581809f48ccce01fe49c28b81c59
Author: Jeykumar Sankaran <jsanka@codeaurora.org>
Date:   Fri Sep 27 08:35:44 2013 +0530

    SurfaceFlinger: Add support for virtual display.

    - Creates a rendering surface when invoked via hybrid path
    - Makes changes in HWC wrapper to handle virtual display via HWC

    Change-Id: I86560b5009949b75c267249799a446b8279eff32
    (cherry picked from commit 577c0753b7aef84b99252545dc256c66d4f9d028)
    (cherry picked from commit 80062f383e7dc012a0ac5eb6f33b8b8edc21377a)

commit 48d7b507799fb3aef87bf86109d53e4ce3137ec0
Author: Wei Wang <wangw@codeaurora.org>
Date:   Wed Jan 23 15:19:02 2013 -0800

    GC triggering performance optimizations.

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

    Change-Id: Ia2b158aa28254d88f68c9534a0eef580aa811b10
    (cherry picked from commit 60c25a585aaa81496e83fb134502594caa0dceb6)
    (cherry picked from commit 8873acb0ffc224388eeadc7204ddb6bff4819c7f)
    (cherry picked from commit 6ca5469d1fbfb432a945df49e276fc4edc1eff87)

commit ad8f7f8ac40450e8b0bad433707f4b2a9ff7b982
Author: Lynus Vaz <lvaz@codeaurora.org>
Date:   Tue Jul 23 18:19:02 2013 +0530

    Check fence is not NULL before dereferencing it

    If the fence obtained in dequeueBuffer is NULL, don't dereference it.
    This will avoid a crash in surfaceflinger.

    CRs-fixed: 516300
    Change-Id: I3054dc37087103f3addae7884bb03460484a1eec
    (cherry picked from commit ddf4adb487dc76ccb75fe2432772d6fc575ed77c)
    (cherry picked from commit c6ae5271f9ced9a747e1481c2ef875ba03674172)
    (cherry picked from commit cdad709878601eb694acbce7d3ae9f7a74bf14f3)

commit f4ce06768f0f47d2203805f13b1f84cee07f8c1b
Author: Rama Vaddula <rvaddula@codeaurora.org>
Date:   Thu Sep 12 14:09:32 2013 -0700

    Surface: Initialize variable and add a defensive check

    Initialize buf variable and make sure to check for return
    value of dequeueBuffer() before sending to the client.

    Change-Id: I0569f2d45825fab0e5d0f38fc91a07990f57c7ab
    (cherry picked from commit a6bd7106a7305208f187fbf0a48f14139e33c9d6)
    (cherry picked from commit e5d7662d68c5be2b282edd58d4feb68a4d476182)
    (cherry picked from commit 885c146144480d4371a0a97df89b8e77f53d3d94)

commit e242f0dc69009d58e65727b03887774709649486
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Fri Feb 15 19:44:32 2013 -0800

    SurfaceFlinger: Dont show Animation on External Display

    - With this change the animation effect will not be shown on
      external display.
    - It will change from portrait to landscape in one shot.
    - Primary would still continue the animation effect
    - set property sys.disable_ext_animation to disable animation

    Change-Id: Ibd94bf166f08eeab1d504afe69230f7c6a617eb6
    CRs-fixed: 453747
    (cherry picked from commit 2435bb907b32a7931a2860b7fa984d2e705b5ed1)
    (cherry picked from commit 04886a20e6547d12b20f45265fc6ae431b0f9efd)
    (cherry picked from commit c6933cb180e67e159a01a75fd36dc8aaaf8b891f)

commit e3f62f84e752b0f376b9dc1ab9e8f212afa1952c
Author: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Date:   Tue Jun 18 19:36:19 2013 -0700

    sf: Override presentation layer with ext_only layer

    Do not add presentation layer to the external list when external only
    layer is present.

    Change-Id: I46c8a85a572f88a2d4026c4026d99fd037b928be
    (cherry picked from commit 9b39ac80890e77177427acec3f6e423085265491)
    (cherry picked from commit d5be54b045571e0b9d139bd1022d922137c13bb9)
    (cherry picked from commit a72ea507c0587031910e484d989ab32179a7ddfe)

commit f5fb2ed25a3dfabe0206a8416fb0676c21ebe4be
Author: Saurabh Shah <saurshah@codeaurora.org>
Date:   Fri Jul 19 16:43:44 2013 +0530

    Surface: Fix gralloc flags conflicting values.

    Due to some custom code, unwanted flags (HW) got added with SW flags.
    Restrict the flags to custom ones.

    Change-Id: I2ab1c75eef4d6d16f0dd7d43aff3c7377486801a
    (cherry picked from commit d9b9e1510418e5babf54f34ed8a81cbc368f521e)
    (cherry picked from commit 947e0802d55a70aef4c32875f4ddfd2c30576bce)
    (cherry picked from commit 4d3419b9185e8f57ff811cf7b14782902c66172f)

commit d6eecf50919312c1dd778c5742de72bb98f98f1a
Author: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Date:   Wed Nov 7 11:30:19 2012 -0800

    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)

commit 3a7b28701f0362f8f440544cb5aee2c8873e6bdb
Author: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Date:   Tue Apr 9 22:33:36 2013 -0700

    frameworks/native: Add support for custom layers in Surfaceflinger.

      - Check for the EXT_ONLY layer and add only that layer to external
        list and do not add that layer to the primary list
      - Check for INT_ONLY layer and remove that layer from external list
      - These are added to support EXTERNAL_ONLY & INTERNAL_ONLY feature

    Change-Id: I8f84eeacebf97d44446f319f69b8a73e56f2cb6d

    Conflicts:

    	services/surfaceflinger/Layer.cpp
    	services/surfaceflinger/Layer.h
    	services/surfaceflinger/SurfaceFlinger.cpp
    (cherry picked from commit 42cd6bd3bc9e8d1e1eaabaaa06d16803b45942bd)
    (cherry picked from commit 62af24e70035866aa8e8741a6f058fa8309d0028)
    (cherry picked from commit 97112b478210c2adebdc1c0b41b60444e9ce6767)

commit 585cfbb105ac16813754477b857fb698ee2e6be6
Author: Prabhanjan Kandula <pkandula@codeaurora.org>
Date:   Mon Dec 17 22:25:51 2012 +0530

    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)

commit c7852e74b946172fd9c645b73fa77e2797a52840
Author: Andy McFadden <fadden@android.com>
Date:   Fri Oct 18 15:50:24 2013 -0700

    Wait for buffers to drain

    When a BufferQueue producer disconnects and reconnects, we retain
    the previously-queued buffers but empty the slots.  This allows
    the number of queued buffers to grow without limit.  The low-memory
    killer does not approve.

    Bug 11069934

    Change-Id: Ia2eaa954c7a3904b54209a3701dba01689e204d8

Change-Id: Ia01c7720846b59449f6c17c7d4e45e96a5ee4a17
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>