LockScreen: allow long-press actions from hardware keys (2/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: I36ea5eb7e93d68de872536dc6d7e93f99ba1621f

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

settings: Deprecate has_led_flash, move to framework.
 * We need this to configure default tiles in SystemUI so move it.
 * Leave the old one in place so we don't kill every device.
Change-Id: I883f9595f74ab52c8c8152e0105400aaefff4afe

LockScreen: allow hardware key longpress to put device to sleep

Change-Id: I251e72cda94f88de3715d818ba62e796e3b2ccd0
Camera button support (2/2)

Add new bitmask for Camera button and options to rebind
its functionality.
Change-Id: I803d3b99adcdd6f2d9de15091709fc8c783ed5de

Add missing variables for camera button handling
Change-Id: I40abd4344800e8cf61285923cc1fac9ba39d652c

Camera button support: fix FC
Fixed a typo in xml which caused Settings FC.
Change-Id: I0c01d03cc8effde9d8422e091a7389dcbb59ffa5

Camera button support: fix another ^C^V fail
Yes, that was merged way too fast...
Change-Id: I88243887446876de39e79020e6d8fecc6351bdde

Camera button support: useful features & bugfixes (2/2)
Screw the remapping, let's make something more useful!
Replaced the code to actually launch Camera app, not just fire the shutter.
I won't remove it: it's cool to have an option to double-click Home for Camera.
Added:
  * Camera wake (with button half-press) and unlock options
  * "Peek": releasing the half-pressed Camera button will
    turn the screen back off
  * Camera playback control

Change-Id: I711fe6b1a8d304b3d0ba9682a8757605992e1bde
Remove 'Allow custom buttons' checkbox (2/2)

Let hardware buttons be rebound by default.

Change-Id: If19fb357cf9dcea419bea6242f4fc1f388916e4d
Settings: Add option to always show battery status on lockscreen (2/2)

Based on the feature by burnsra in CM7
Authored by blunden
Tweaked by dvtonder
Change-Id: I1c8c8eef3d0c913c621f735e7d5e395c8768fe76

lockscreen battery status: add off option (1/2)
Change-Id: I06dd1b81826bdb1c1e35b72d99970f97dcad1a34
Settings: Update DE translation

Forward port strings from CM-10.2 to CM-11.0

Change-Id: I4ae9bbd81321a85800364991ed480a55da0a17b6
Settings: Fix up top level "Privacy" section

Change-Id: Id4dbda10a891c793bc6eb3c42807cc0e3f6092cc
Merge "Settings: Update DE translation" into cm-11.0
Fix crash when opening privacy settings on tablets.

Change-Id: I0b9853c397304a157bb6a7b3f7726979a63421b9
Fix LTO availability check.

Change-Id: Ifb8ab65584df2f8b638b6e178e134b5e3a61cfce
Fix confusing warning dialog behaviour.

The settings app closing when pressing back while the dialog is shown or
clicking outside of the dialog was confusing for the user. Instead, make
sure the user has to acknowledge the dialog.

Change-Id: I8ffdf6a2ede8b67176fd22a13d7046a707b52b89
Merge remote-tracking branch 'cm/cm-11.0' into wszf