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>
restorecon /data/media when re-creating it for multi-user upgrade.

Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
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>
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>
Revert swaprect feature for new upstream implementation.

Revert "Display: Define new composition type for blit composition"

This reverts commit 835f0ad6da60ad5cd5f8d6d872c5665aae6f5584.

Revert "surfaceflinger: Conditional compilation for swaprect feature"

This reverts commit 5e9e33ac72e608d584b13bea176f8fc7f30d88e7.

Conflicts:
	services/surfaceflinger/DisplayHardware/HWComposer.h

Change-Id: I83e3b5a66b9ea7c3bae008d6a7e84c1358c512bc

Revert "SF: Add flag for swaprect status in HAL"

This reverts commit 4fd75c0a371d4ee04e0f583d790b576494257ea8.

Conflicts:
	services/surfaceflinger/DisplayHardware/HWComposer.cpp

Change-Id: Ibd8714a49e09653bf34da466db17fbe4b20c6c8d

Revert "sf: Enable swaprect optimization by default only on QCOMs"

This reverts commit 0438f810c7e8e3c53850874c7bdb74ac43b2ec88.

Revert "Display: Add swaprect feature for MDP composition."

This reverts commit 9b5ef3793b6012e979c10e4cc9a7e091092a4a57.

Conflicts:
	include/gui/Surface.h

Change-Id: I6d276ee82f8f0b4214e79c91cd9675fcbfd57dd4
frameworks/native: Propagate dirty region in hwc_layer

This change propagates dirty rect value of each layer down to HWC
in hwc_layer structure.

Change-Id: I91d87facf4a321b92539de5353faf09b553d4919
egl: Addition of eglGpuPerfHintQCOM

This patch implements a wrapper that hooks into the QCOM
functionality.

Change-Id: Ifcb77e90ba137a4dede7d25663b032df6acc799d
SF: Add known programs to cache.

First open/close application after boot creates
shaders and compiles them we can cache these
programs at initialization, to avoid CPU work
at open/close application and JANK in SF.

CRs-Fixed: 615960

Change-Id: I4837e83941db903e84f195aa052e9e9dab6ff81e
Merge branch 'kk-4.4' of https://github.com/AOSP-S4-KK/platform_frameworks_native into msoctos