fb: Add home and menu unlock options 1/2

Change-Id: Iafce29c412976ae949148daf0ddfc57ecf6a0111
Signed-off-by: scott <scott@ubuntu>
LockScreen: allow long-press actions from hardware keys (1/2)

Allow following actions with button long-presses on lockscreen:
- toggle flashlight (if available)
- play/pause/next/previous track selection
- toggle silent mode

Allow customizing of back, menu, and home buttons. Search
button events are completely ignored on the lockscreen.

Auto-detect hardware keys, only show appropriate menu
options based on the actual hardware keys available on the
device (or completely hide if there are no hardware keys).

Based largely on Danny Baumann's work from gingerbread.

Ported from CM10
Change-Id: Iff32736d00ca5d4122f64a6a861bbb0a1de9cca9

Fix home/menu unlock with long press hardware key
- Forward port of commit 2a572ee
Change-Id: Ic2eb85542f8052fe1662244fe5e72ba12a98608b

Keyguard: Fix for home wake/unlock
sometimes device is waking and unlocking during the same keypress.
Change-Id: I72ea7611d39aac0cd03dfd5aa7036aeef7600140

Use sticky broadcast to convey torch state (1/2).
It doesn't really make sense to store the (non-persistent) state of the
torch in a (persistent) setting. As the torch is sending a broadcast
anyway, make that broadcast sticky and use it to convey the state.

Also unify the torch constants (actions, extras, activity names) at a
common place.
Change-Id: If845bef27cc79990794aa748dce18cfea3bac1f5

Fix Home/Menu/Back keys' unlock
Change-Id: Ibd3842b6ad8e037a2a9f8eb581e7c55900017b0f

LockScreen: allow hardware key longpress to put device to sleep
Change-Id: I54260e21c462bcabd9b6383e22f44d644630b4d3
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Remove 'Allow custom buttons' checkbox (1/2)

Let hardware buttons be rebound by default.

Change-Id: Ib4fcae7d93dc63d53490442d7ff44678583b0d9c
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Framework: Add option to always show battery status on lockscreen (1/2)

Based on the feature by burnsra in CM7
Authored by Blunden
Tweaked by DvTonder
Change-Id: I642da4dcd82a776a74d77031d37acc76f97b25af

lockscreen battery status: add off option (2/2)
Change-Id: Ie10015865f161e783dc394d467e456d51dc9fbbc

Signed-off-by: scott <scott@ubuntu>

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/symbols.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Merge remote-tracking branch 'upstream/kk44' into kk44