libs: binder: MemoryHeapIon: ifdef ION_EXYNOS_VIDEO_MASK

Exynos secure memory regions were separated here:
https://android.googlesource.com/platform/hardware/samsung_slsi/exynos5/+/ce73ba1%5E!/

Only compile the legacy ION_EXYNOS_VIDEO_MASK code if legacy HALs are used
(and ION_EXYNOS_VIDEO_MASK is defined).

Change-Id: I8cb58bbbb829d64a2ed39dbd27cc0d0ae3c9dd09
MemoryHeapBase: ifdef for gingerbread/froyo compatibility

Allow to "revert" by a board config flag the offset member addon
see commit f24c4cd0f20 (aosp change id Ie618fb5c0718e)

This change is required to use overlay based proprietary camera libs
coming from gingerbread and froyo builds.

This change also requires a global cflag named BINDER_COMPAT
because a lot of modules use the MemoryHeap includes

Add this in your BoardConfig.mk :
COMMON_GLOBAL_CFLAGS += -DBINDER_COMPAT

Backported from /#/c/13317/

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

Conflicts:
	libs/ui/Android.mk
sensorservice: Add legacy sensors fusion.

This change allows devices with accelerometer & magnetometer but
without gyroscope to still get virtual sensors such as Gravity,
Linear Acceleration and Rotation Vector.

Ported from: http://review.cyanogenmod.org/#/c/31329/

Change-Id: Ifa702cb0383ea1fd84511539fb67ec69ce9a558a
native: add flag to disable legacy sensors fusion

Causes problems on all p31xx devices.
http://pastebin.com/PabjFVWP

Change-Id: I12df77c5bca2c67447ced1e3d32b405009d9e3aa

Conflicts:
	services/sensorservice/Android.mk