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

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Add dummy config for long press menu

Conflicts:
	core/res/res/values/config.xml
Add UUID (re-)scan support for vold-mounted volume (1/2)

Consider the following scenario:
* Using physical primary only storage cofigurations with the sdcard
  daemon
* On first boot, the UUID is plumbed to the framework via vold, but this
  is only done when a volume is mounted (via the extractMetadata()
  function).
* When the framework crashes/restarts, vold does not need to mount any
  volumes (as the sdcard daemon will still be running), which means
  that the UUID is never plumbed to the framework upon restart.
* MediaProvider will continuously crash with an NPE due to the UUID being
  null.

Workaround the issue by adding "scanuuid" to the "vdc volume" command
list, and trigger a scan when the framework detects that a volume is
mounted but the UUID is null.

Change-Id: I01fceadf85dac97fbf19c41eb865abed714fe0f4
Implement DocumentsProvider.createDocument and deleteDocument

Fixes AOSPA-431
This is needed to delete and create files/folders in DocumentsUI.
Some open questions are:
1. Are the methods implementented according to their description?
E.g I'm not sure whether deleteDocument should be able to delete folders, too.
2. I first didn't want to modify public API, but deleting files from within DocumentsUI somehow doesn't work - file.canWrite() always returns false
3. So is modfying the API this way OK?

Change-Id: Ie3a9d1888decaa0f08de1a5183ffd23760be15b9
Revert "Add dummy config for long press menu"

This reverts commit 57073ad8cb9a05a9c2a2f14f6e9db575c6a78248.
Revert "Dispatch keys to a device specific key handler"

This reverts commit 3ccd5cc3bc7afbf80822ff26c5b267abd586a8b7.
Revert "GEL Integration (1/2)"

This reverts commit 71af9456b57c41ee7b9897c90a082ab9b7a50088.
Revert "Add Profiles to SlimActions"

This reverts commit 36e6bb4c5940aec8143e5322bd7203b24701c1bd.
HOVER: Option to exclude topmost app [1/2]

Originally taken from Tigger2014:
https://github.com/Tigger2014/android_frameworks_base-1/commit/5af0e1c84e86e9b4e6947163aaf58e9ab541079d

Change-Id: I6da9027af4c7bc74945a06b97b876f94cf817844

Conflicts:
	core/java/android/provider/Settings.java
HOVER: Add QS Tile [1/2]

Change-Id: I73b41f80762cb71fa86630314891e9670b43ea87
HOVER: Disabling HOVER isn't necessary at all [1/2] …

as we can just hide the HOVER-Button in StatusBar

Change-Id: Idde34acc859e6191a71239616b2b69f09650ef49

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Add EventLog event for logging of attempts to call java.lang.Object.getClass

Bug: 13694467
Change-Id: I886c6ffb3a008d0cf701c1adc16c607cbf7dce39
Fix icon support for secondary users.

This fixes the problem when switching to a secondary user and
icons are currently applied.  Prior to this patch the secondary
user would see droids as their icons and apps would FC at start.

Change-Id: Icd4275eae5868612bf2a81b375ac4d0779a61395
Add previews to the themes contract.

Change-Id: I607a6eda1c63a701516d2bc78ca6b705841fbdf7
Remove DEFAULT_THEME_APPLIED_ON_FIRST_BOOT

doApplyDefaultTheme should be able to apply the default theme, if
one exists, whenever applyDefaultTheme() is called.

Change-Id: Ia50b4089d122855a4ddde91a02eef33ed3f9eaf4

Conflicts:
	core/java/android/provider/Settings.java
Don't create idmap if app doesn't have resources.arsc

Some apps do not have a restable but some legacy themes
try to theme these apps anyways. In this case we skip
the idmap creation process.

Change-Id: I8bc60984299791733d4fe8c9bbcaa75eca6d736b
Revert "Show package names during dexopt"

This reverts commit cfd3684170b660fb414ddc009a47756bdab524bc.
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Protected App [1/3]
 PackageManager:
   Add support for Protected App Components
   Adding protect flag to ApplicationInfo

 SettingsProvider:
   New DB entry for protected app components

Change-Id: If04843e93b572191d4654c01f4da8f087ba9fba8

Conflicts:
	core/java/android/provider/Settings.java
Add the appropriate @hide flag so we can build!

Change-Id: Id45f682287741badb13e256f6029c52820a068bd