binder: add compat symbol

Required for older Samsung libtvout

Change-Id: Ib18d2513570382432d49f302ab041230650372f2
Allow building against other qcom display HALs

* also fix normal pathing to use the new aosp paths

Change-Id: I26ca3f28f950e82130ba51b4408234d06703d044
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
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
GlES2: Add NULL check

Check for NULL before calling thread specific glGetString.

CRs-fixed: 569609

Change-Id: Ifee8257152ba7ca7a05df5d7b113171b71d16c82
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
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
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
Merge commit '4.4.1_r1' into HEAD

Change-Id: Ib9992731a050b687730b3fd401f3d416f548c9eb
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
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
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>
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
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
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
Forward-port surface dithering from CM10.2

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

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
hax: Add back the SURFACE_SKIP_FIRST_DEQUEUE legacy EGL workaround

Set BOARD_EGL_SKIP_FIRST_DEQUEUE to use

Change-Id: I46257a7e9e6b6e093a5cb92eaaaef4bdd0435a12
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
libs/ui: Fix crash issue because of null pointer access

- handle NULL check is required while flatten GraphicsBuffer

CRs-fixed: 579102

Change-Id: I292b4b25dc1f5320378cc9e4affbad326e1fdaed
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