Prevent IPCThreadState::joinThreadPool from spinning on unexpected error

Adds logging to help determine what is happening to the /dev/binder
fd and dump the process state when it happens.

bug: 8912673
Change-Id: I2aa0c66fc499e91e0bf9ee4ae20404bec35adc82
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Find non-extension GLES wrappers in eglGetProcAddress

This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.

Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
fix a dead-lock in sensorservice

sensorservice would deadlock if for some reason
a sensor failed to enable.

simplifed the code a bit, and made it behave a little
closer to mr1.1 -- I couldn't convince myself that
some changes in how locks were used were correct.

Bug: 9794362
Change-Id: I6110f5dbb67e543f1c71d127de2299232badb36a
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Forward-port surface dithering from CM10.1

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

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
Merge tag 'android-4.3_r2.2' of https://android.googlesource.com/platform/frameworks/native into cm-10.2

Android 4.3 release 2.2

Change-Id: If9463fdc227b5fc97450a3ba94da815af6d9e657
Don't use fence sync for qcom legacy

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ifecc7af579bfde9d0a7daaaf528ea0773ce6ceb2
surfaceflinger: enable EGL_NEEDS_FNW for qcom legacy

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ia6df94e8380062d646e29f293e5dc768e8a138e7
Merge branch 'cm-10.2' of github.com:CyanogenMod/android_frameworks_native into cm-10.2

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

Change-Id: Id09ab354324e5b995bbf406ef60027b20c73f615