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)

Reworked for Android 5.0 compatibility by Andrew Dodd <atd7@cornell.edu>

Change-Id: I84f8bf18b08e6bddd0c2bac3d045caff2589a0e7
Signed-off-by: Andrew Dodd <atd7@cornell.edu>
base: add basic support for device wake events

Handling of events that can be used to wake the device like
button events and/or screen events like dt2w.

PS3:
-start with general offscreen event handling

PS4:
-dont kill power button :)

PS5:
-added settings for volume and home button wake
now only someone need to add settings for it :)

PS6:
-stupid

Change-Id: I359654ec29c7f44f41bcf7ed71738568e45f8993
[1/2] base: Option to hide Adb notification icon

Change-Id: I1c1fc86bd8112797d8bb5a8bd1b8065c0f32fcfa
base: added screenshot delete action in notifications

allows deleting a screenshot from the notification
inspired from CarbonRom - initial from CM I guess

Change-Id: Ib825cfd5aa7d3b9730895500a7d53c0151c895f4
appops: Fix an off-by-one error that causes the location icon to stay on

Commit bdfde4fc820fad768dbc596b17507e4cdc84b850 added Bluetooth AppOps
capabilities, but it contained a subtle bug where the string representation
was added in the wrong place, offseting every operation after it by 1. This
broke the toString functionality but didn't have any consequence since this
was used for logging purposes only.

Commit b01b08928a42a626f5f1c6c18a20d786fb873d75 changed AppOps so that
operations are persisted by name instead of by index, this caused the string
representation offset to affect functionality and, among other things, one
of the consequences was that coarse location requests were being interpreted
by AppOps as high-energy location requests.

Change-Id: I319f1ac1c5910098689b4cb8645eb92c0e3538cb
Merge "base: added screenshot delete action in notifications" into android-5.0
Rework thumbnail handling

Since ids of media file are usually not continuous, the original file of thumbnail are sparse.
When there are big numbers files on external storage, the size of this file will be horrible.
Ex, when the id is 20000, then the .thumbnails/.thumbdata3-xx file will be 50000*10k = 488.28M.
Can refer http://stackoverflow.com/questions/12396715/android-huge-thumbdata4-file-in-dcim-folder
Because after 4.0, MediaProvider will scan any files, this will be a big problem.
So I modify MiniThumbFile.java to avoid this.
According to the id, we now produce an index file.
In this index file, one id will use BYTES_PER_MINTHUMB_INDEX(8) bytes in offset (i\d+1)*BYTES_PER_MINTHUMB_INDEX.
The data of these 8 bytes is the index of thumbnail file. The first BYTES_PER_MINTHUMB_INDEX bytes keep next available index.
And when you need insert a thumbnail, the index increase by 1. In this way, the block data in thumbnail file will be
continuous. And thus unnecessary zero paddings will not be saved.

http://jira.omnirom.org/browse/OMNI-924

Also includes: https://github.com/CyanogenMod/android_frameworks_base/commit/8bd0a83c1dcd89a74ad53ad6bc77c9dd4d3e8c71

Change-Id: Ifdf0cc77c9317935a520c67b598cae532eafba47
(cherry picked from commit ad2f9d4807c4b01ba0cd3a67e69b40ae4209ff55)
fix for screenshot animation glitch in portrait

edits by Stefano Semeraro aka Suxsem.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6
SystemUI: Add missing recycle calls

Change-Id: I6e5346d9f423350e643d696299136799b78cdd28
Merge remote-tracking branch 'upstream/android-5.0' into android-5.0
Omni sync