Release locked buffer when it fails to acquire graphics buffer

The JNI buffer in ImageReader_imageSetup is not released when
it fails to acquire graphics buffer. After all JNI buffers are
exhausted, ACQUIRE_MAX_IMAGES will be returned and leads to
error. The JNI buffer should be released when it fails to acquire
graphics buffer.

Change-Id: I3319a58ac44e36c8593b404672a685c4b589a735
Frameworks: TRDS fix possible UI freeze on auto mode change

- only call on theme mode change when auto mode changes. Under special conditions
  it can happen that it is called twice
- ensure that whenever a mode change is really done to close the notification shade
- minor cleanup

Change-Id: If1ffd4c1d2c1d8b17b6e7867a42bad1776e82c0c

Conflicts:
	packages/SystemUI/src/com/android/systemui/quicksettings/ThemeTile.java
	services/java/com/android/server/UiModeManagerService.java
Revert "Make sure to turn off led after pulse()"

This reverts commit bd20f251096a12f284502540871288ecc2ff2357.
Add support for QC's time_daemon

Enabled by BOARD_USES_QC_TIME_SERVICES=true, it requires the device
to provide its own time_daemon executable and libtime_genoff.so
proprietaries. The library should be copied by the device's setup
config to $OUT/obj/lib for linkage (and pushed to the final build,
obviously)

Change-Id: Ie6964dbe2692dc33fc04093a5b89b6922d8443c8
Frameworks: Respect and handle shorcut custom icon resources (2/2)

If a activity shorcut has an extra icon resource or drawable we need to handle
it. Fix this for all out shortcut features. Most is centralized so a small change

fix as well to small sizes of custom icons on QS

Change-Id: I4f1b78e5979e23f5edd0c670510ab5d718710a93

Conflicts:
	core/java/com/android/internal/util/slim/LockscreenTargetUtils.java
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
	packages/SystemUI/src/com/android/systemui/quicksettings/CustomTile.java
Frameworks: fix sdk build

ups....derp

Change-Id: I990ec0808b6aa264b4d92d6829484441e4c842e6
frameworks/base: added missing line

Change-Id: I614ede7f178ab49d74d26349054d36a88cbd713d

Conflicts:
	packages/SystemUI/res/values-ru/slim_strings.xml