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/slim_symbols.xml
SystemUI: fix right hand side gestures on lockscreen

two finger quick pulldown was not accounting for being in the keyguard
adn was eating touch events when it shouldn't be.

Change-Id: I625d48a4002aaaf2d55d7efaed65d892ab7aa13c
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
keyboard: re-add code to detect lid state and handle lights

Depends on libhardware patch for the light ids:
http://review.cyanogenmod.org/77944

This squashes the following commits from cm-11.0 and updates
them for cm-12.0:

From: Dave Daynard <nardholio@gmail.com>
Date: Tue, 19 Nov 2013 18:22:45 -0500
Subject: keyboard: re-add code to detect lid state

keyboard: re-add code to detect lid state

This was lost in the cm-11 merge. Without this, a change in lid state
isn't generated to light up the keyboard backlight

Change-Id: Ief35cebcb62da13afe1ae7531d69ab58e196be9e

From: YuanQY <yuanqingyun@gmail.com>
Date: Fri, 8 Feb 2013 10:59:22 +0800
Subject: Keyboard light: Fix the physical keyboard not light when

Keyboard light: Fix the physical keyboard not light when it's visiable.

Change-Id: I595afd3cb6b422a17ae0f6ec20aa51979db13810

From: tbalden <illespal@gmail.com>
Date: Sun, 31 Mar 2013 18:33:53 +0200
Subject: keyboard: adding functional alt/shift lights

keyboard: adding functional alt/shift lights

This is useful for devices that has QWERTY keyboard
and leds for the Alt/Shift (Fn/Caps) keys, like
htc doubleshot.

Change-Id: I66ebc2d881438f5b51db77eaa885421e65a7da0d
display: Don't enable keyboard lights when dozing

Change-Id: Ifd2e490da0af564315aa3c07002cb045377b78cd
Also dump widget options in 'dumpsys appwidget'.

Change-Id: Ia002c4b93d453ecb94be9312371ec71853a9774b
PhoneWindowmanager: disable panic mechanism when PolicyControl activated.

Change-Id: I5cf5f681237bbd17ec0fe2d041dd782cfb4b72f0
Show confirmation for deleted screenshot.

Change-Id: I4a36cf06bf252e5e15fe08fbd054dc64a0a507ae
Add PowerManager integration for button and keyboard backlight.

Allows setting button and keyboard backlight brightness as well as
button timeout.

Change-Id: I550cccafc0a8f90d6347de9261adb26b75955cc4
SystemUI: PhoneStatusBarView: disable DEBUG_GESTURES

Change-Id: I3911c464d1f008ac2c96a1104761007fad41a3ae
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: add Settings.System toggle for quick-quick settings pulldown

Change-Id: I3c5dcfc23f39bf8be6c402e25f61e6f57a8add2c
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
SystemUI: Add double tap to sleep

* Make it more reliable
* Add it to keyguard
* Add a content observer to not always query Settings.System on every
touch event

Change-Id: I292c4d9d9f810843590b7a9ec6e15b99ac44009d
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: Revert all caf statusbar icon additions

This is still a not to the endd thought nightmare + that we do not really need it right now.

Roll back for now till it is completely overworked.

Change-Id: I7ce9226535680303ff99139cfd3083d52608b88a