Add heap configuration for 1080p phones with 2048m

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

Change-Id: I8fbba2e5a2a2cf2d7a6898ca6bae8639d6cf5a19
Abort surface composition if hw surface is invalid

If an invalid display device is detected during surface composition
(e.g., a simulated secondary display is removed), abort the
composition.

Change-Id: Ia6afb2e287882d8ae0614eb25463d3f85b687adf
gl_code.cpp: Remove a DOS style newline

Change-Id: Id3edd6e511371fa8b0afef2e90baed4662ed76c4
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
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
Frameworks_native: TRDS 2.0 (2/3)

After testing with huge success we discovered here
and there small problems (like NFC beam animation is broken,
TRDS was disabled on cardock etc) which mainly was caused
due that we used the already from AOSP introduced uiModes
qualifier which could cause in special conditions this
conflicts. Beside that we want a bit more flexibility.
Result: This commit introduces the inverted qualifier as
complete own qualifier undependent of the already AOSP
used ones.

Beside that it fixes all known issues......features:

- it is now completly working over the AOSP Configuration classes
  Means every app get notice of a change trough onConfiguratioChange
  and restarts it's activity if change was detected.
- app can disable that like some other configuration values
  over AndroidMainfest.xml
- beside "inverted" folder another "notinverted" folder is introduced
  for another themeing (eg white)
- qualifier order is direct before the official uiMode qualifiers
  (see AOSP docs)
- All usual Configuration actions can be used with the inverted
  qualifiers....like BroadcastChange, direct read out from every
  app etc. etc. Note: Only system can change the uiInvertedMode

So as you see a real own qualifier now

NOTE: Apktool as well aapt need to be changed to fit the "new
qualifier"....which means that we need to recompile our gapps
that they react as well on this new behaviour. Think we will get them ready
next 2 or 3 days.

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

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

Change-Id: Iac9a913e0984d7e9e419772215d3fb3d1a0cb5e8
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
Fixed clang build error for libgui

Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>

Conflicts:
	include/utils/Singleton.h
provide overrides for hwui memory limits for xxhdpi phones

Change-Id: I8b369619cd07530d0468a5449da30f338c13c7d2
Exit dumpstate on SIGPIPE to avoid cascading child crashes

When dumpstate ignores SIGPIPE it can lead to a cascade of tombstones /
coredumps since many of its children don't handle or ignore it.  It's
best to just exit dumpstate once the pipe is broken.

Change-Id: Ic0c57ecf4171f0c0a07837e51c41cb1876e1350c
fix mem leak on error handling

Change-Id: I40d8e371c46184aa701fa676246201a9d8f6e27d
Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

See b.android.com/55873

Change-Id: I92c549e1a595662d4df8fa0e47675ccb2b8814fd
utils: Allow non android namespaces to use ALOGD_IF_SLOW

Change-Id: I9207b64954fae2f56cc5f6aa5796a2e737400623
Simplify and improve setting static refresh rate

Avoid setting mRefreshRate two times

Change-Id: I2e0d2133ad4cdff382f8cca0f9673e1e298f8ab1

Conflicts:
	services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
Merge remote-tracking branch 'lq/jb2'; commit 'HEAD' into HEAD