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
WMS: fix no thumbnail image of Gallery in the recent tasks list.

When it takes the screenshot of an application, it will calculate
the minLayer and maxLayer first, and if a window is full screen,
it won't deal with the windows below it. However, the surfaceview
is placed below a window but will be displayed at front, this make
the surface view can not be included when take the screenshot of
an application, then it diaplays a black area in the recent tasks
list.

If the currect window is full screen, no need to finish the
calculation.

CR-Fixed:566752

Change-Id: Iaf3e9a3e6520007571ea545ccc9c05d4b1b416fd
hwui: Apply hwui qcom fixes to all adreno-bearing hardware

Even if the device doesn't fully use the qcom stack, changes to
libhwui are generally workarounds for adreno-specific issues and
apply across the board without other dependencies

Change-Id: I10455ebf09c1d00762b06e3c092398604bb39796
Fix FindBugs issue

UsbStoreActivity: Null pointer derefence

Change-Id: I9d631c50c30eb98e32cca5a5085513b6904db676
framework: fix reference leak in activiy manager

Change-Id: If7f27ea35f5a1d1dd7c98fbe5f92729ab9ba0257
framework: fix screenshot and rotation animation for devices with abnormal hw rotation

port foreward from cm10.1:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I14b6e2403b9be345a1a591138f8a3a12ca8e4f89

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
pm: Prevent a system_server crash is package name is null

 * If an app is placed on the system partition and it doesn't specify a
   valid package name, system_server will crash forever. Just skip it.

Change-Id: I9b911d40b3c4d7cf6fac8cc0166a2ba359329b7b
Revert "am: Allow more hidden apps on devices with lots of RAM"

 * No longer required.

This reverts commit e943b71954faa659c6e03808cd912a4e9f898b05.

Change-Id: I5e20b08277d1695a8a3c57c72f1b5ca6aec70f8c
Register the ActivityTrigger on all QCOM devices

Change-Id: Iaecb5dd82be64fea5a625cc42243203d0f2f2ce9

Conflicts:
	core/jni/AndroidRuntime.cpp