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
[3/4] JDK8: Fix ambigous call to MediaProjectionManagerService.dump

Change-Id: Iee3388dd79d8274b5be499b79689f132df3a36ce
Merge "[3/4] JDK8: Fix ambigous call to MediaProjectionManagerService.dump" into android-5.0
[1/2] base: allow disabling volume adjust sound

Change-Id: I95893180865209d2aeaf4b3fa129a74df7523bbe
[1/2] base: Reboot Recovery & Reboot Bootloader in Power Menu

Coded fram scratch by me (yashade2001). It's not a port from CM11 or other KK ROMs.

Drawables by Alex Cruz

PS2:
-use same logic as in 4.4 when to enable advanced reboot
-compared to 4.4 dont implement in ShutdownThread but as a submenu of the global actions menu
-expose advanced reboot API from ShutdownThread
-add new GlobalAction filter for checking primary user and secure locksreens

PS6:
-new drawables

PS7:
-slient mode button sets no interruptions

Change-Id: I3e60ce93a541b0c9deb7ad53b27825acce91d251
[1/3] base: Add two new AppOps

- OP_OTHER_ACCOUNTS: Access other applications accounts from account database
- OP_READ_PHONE_INFO: Read phone information (IMSI, phone nr, ...)

This commit adds both Ops to AppOpsManager and the filtering to AccountManagerService

Change-Id: I4229f65f19c6e3c81b7f13534cf9d7e12aea2509
Dispatch keys to a device specific key handler

Injects a device key handler into the input path to handle additional
keys (as found on some docks with a hardware keyboard).

Configurable via overlay settings config_deviceKeyHandlerLib and
config_deviceKeyHandlerClass.

Change-Id: I6678c89c7530fdb1d4d516ba4f1d2c9e30ce79a4

DeviceKeyHandle: The device should consume only known keys

When the device receive the key, only should consume it if the device
know about the key. Otherwise, the key must be handle by the active app.
Also make mDeviceKeyHandler private (is not useful outside this class)

Change-Id: I4b9ea57b802e8c8c88c8b93a63d510f5952b0700
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

DeviceKeyHandler : Allow handling keyevents while screen off

Some devices require the keyevents to be processed while the screen
is off, this patchset addresses that by moving the filter up in the call
hierarchy.

Change-Id: If71beecc81aa5e453dcd08aba72b7bea5c210590
base: remove old offscreen gesture code

Now that we have DeviceKeyHandler

Change-Id: I9930f47d59a95a456563d9301c55927d1c2686ca
base: added flashlight toggle

send broadcast com.android.systemui.TOGGLE_FLASHLIGHT to
toggle the flashlight

Change-Id: I0601bbfb05b3b28b2bedde2602b26e3ec61c27e7
base: added national roaming for BOB in Austria

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

Users of BOB in Austria (MCC 232 MNC 11) can roam on
A1 (MNC 01)

PS2:
wrong order

Change-Id: Ibf9f48cd0a142eb984ff2450337031f6c411f8c0
(cherry picked from commit 290fe8f36a60034162b8377b265ddb89549a3bc8)
base: added national roaming info for Play in Poland

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

Users of Play in Poland (MCC 260 MNC 06) can roam on
Plus, T-Mobile, Orange (MNCs 01/02/03)

Change-Id: I8ea62b0ca40bac9ced11802ee8ef583d6392a199
(cherry picked from commit cf0369442ee891775eb9d8d2618f3d77eb91b8c8)
base: added national roaming for 3AT on t-mobile austria

Users of 3AT (MCC 232 MNC 11) can roam on t-mobile (MNC 03)

Change-Id: I5bb6f73c43b7f57c59deda5dc4e70d98c90fdbb9
(cherry picked from commit 3d597b6e9ff51c3fceba9fe623f97cd0a2eaa395)