Lockscreen: longpress on expand challenge handle

- Unsecure screen lock, long press will unlock the device
- Secure screen lock, long press and widget will fade into the background and secure method is displayed

Change-Id: I7d980f8e7e07226c97a64a63910a1410e6fb84c0
Quick Settings: Fix flip-to-settings animation

Bug is reproduced as follows:

1. close the notification area while Quick Settings is showing
2. open the notification area, so that the notifications show
3. click the button on the top, to switch to quick settings.

Notice that only half of the animation is played. Having some
notifications shown helps visualizing it.

This bug was introduced by

I3cab45f72fe3c5fa40d4631fc6a84ea7bfe51bd1
http://review.cyanogenmod.org/29118
(Yes, it was me. Sorry.)

Change-Id: I31510617bf7e78fa09305a9c323b6ce30c058218
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

Conflicts:
	core/res/res/values/symbols.xml
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>
Show dock battery level if available

Updated for Jellybean.

Change-Id: Iabfd12eb327a9fe32ffa46eea5c9038263e105a9
frameworks: add dock battery drawables for HDPI devices

Change-Id: I8cc2cfc74548693ffbdd48447d7fa414fd451f59
Cleanup dock battery support

Send an intent as soon as the device is undocked to get a timely update
of the SystemUI.

Adds a proper implementation of dock detection in BatteryService via
"dock_battery/device/ec_dock". This will probably have to be rewritten
in a more generic way to support other manufacturers as well (once we
support other docks at all).

Change-Id: Ib1088c118c8695fd93ba085d976ca1eb374ae71e

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/DockBatteryController.java

Conflicts:

	services/jni/com_android_server_BatteryService.cpp

	modified:   core/java/android/os/BatteryManager.java
	modified:   packages/SystemUI/src/com/android/systemui/statusbar/policy/DockBatteryController.java
	modified:   services/java/com/android/server/BatteryService.java
	modified:   services/jni/com_android_server_BatteryService.cpp
frameworks: base: systemui: remove textSize from dock_battery_text

* Having this option set caused the text size to differ between
  dock_battery_text and battery_text when using the percentage
  battery mod.

Change-Id: Ifb58d4be08d2fc547fe74574dbd9d8d6bd279ede
SystemUI: Fix dock battery visual glitch

Hide dock battery views if device don't support dock battery status

Change-Id: If470e00a9afc2233865302bf3fa13367a77c6191
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Camera: add additional ISO modes (2/2)

Change-Id: I3460c3de4cbef467430673146a9ddb2fdc8f5032
Changed profile selection to single-tap action

The behavior taken from reboot (choose action, select okay) was
inappropriate for profile selection, which has no big impact at all.

so now, simply selecting a new profile will toggle the action and close the dialog.

this patch is needed for the power menu qs tile (WiP)

Patchset 2: Remove cancel button and title to stay consistent with power
menu

Change-Id: I474d5ba4753e7d6cd21a916f2e2aaf8ddb224fd2
frameworks/base: Added English UK keyboard layout for physical keyboards

Change-Id: Id6feb128964c76ebd74b3e0d67d8f90fedb91dda
Fix for ambiguous and broken disk formatting dialog

This patch ensures that the path-string from StorageNotification is converted
to the appropriate StorageVolume so that it can be correctly passed to the
formatting class. It also displays this path to the user so that it is clear
what will be deleted.

While trying to use a USB flash drive over OTG, the drive's FS somehow got
corrupted, so Android gave me a notification to re-format it. Okay, so then
a dialog pops up that doesn't specify what volume/device it will format, and
I incorrectly assumed it would be the USb drive. However this activity defaults
to the main internal memory for some reason, and wiped my data. Thank God for
them internets... (Dropbox)

Change-Id: I5621dff3cfd12a173b0d793398cf729333f97263
Re-implement magnetic targets

This reverts commit 8d037a2ded2edafc2ecafad2a8d799cb3f82f629.

Change-Id: I26da0ab2c9d65828bf9cd16a82dad7d1c50dc891
Status Bar: Fade CM widgets on Low Profile mode

CyanogenMod's status bar widgets do not fade (Circle battery, signal
text, etc), when low profile mode is entered.

This makes them behave.

Change-Id: Ibb79390d7ec08ce1bdc86a2d5e452ab4245f474f
AudioService: allow volume control on analog dock

This re-enables volume control on some Motorola docks.

Change-Id: If7751867de2c0cefb5a8518b5a6a607a9676b946
Add a long-click target (display settings) to the brightness tile

Change-Id: I538cda0ecf999467d7b6a30501807c0c52fb59b6
PowerManagerService: Implement setButtonBrightnessOverrideFromWindowManager method

Differs from Android 4.1 (and earlier) implementation in that the
overridden button light still turns off after BUTTON_ON_DURATION instead of
staying on until screen off.  However, button lights are annoying, and
really the purpose of this is to allow apps (e.g., Screen Filter) to
_disable_ the button lights altogether.
Add option for switching between UMS and MTP/PTP mode. (1/2)

Change-Id: I8e692d468cb36ccc97ca69b8a2eb11afeb711eae

This adds support for switching between UMS and MTP/PTP.
Framework part (this part) will only enable UMS if the config setting is set.
Standard is to enable UMS if the primary volume supports UMS.

It's only porting this http://review.cyanogenmod.org/#/c/21117/
Fix profile's xml

Patch Set 1:
Fix parsing profile's xml for airplane mode and ring mode.
Reading the xml used to turn all settings below airplane mode and ring mode to default.

Patch Set 2:
Rebase
Clean up

Patch Set 3+4:
Rebase

Change-Id: I902318fd4db82bb628e0d157c48c4e86ba30cf71