SystemUI: Fix potential NPE

Does already cause issues on some Halo ports to other ROMs.
Might not cause issues on PA (yet), but better safe than sorry.
clean up double imports
WMS fix: add back IDeviceHandler import
fixes errors in builds referring to WindowManagerService.java

Change-Id: If446047e5b0f31f1e7fe2d3f1507dc94669fb5ad
Merge branch 'jb43' of https://github.com/ParanoidAndroid/android_frameworks_base into jb43-legacy

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I86299c64e347692045e8990280fd1199c153a14a
TEMPORARY: Reintroduce button-backlight (and respective inactivity timeout)

The power manager rewrite from Change I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
completely removed support for control of the button backlights, which makes
all capacitive buttons out there stay dark. The commit message in that change
mentions it hasn't been implemented _yet_, so this fix should be temporary
until upstream does their own implementation

Change-Id: I6094c446e0b8c23f57d30652a3cbd35dee5e821a
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.

Conflicts:
	services/java/com/android/server/power/PowerManagerService.java

Change-Id: I4220246ee364222673586fa908404f9d16efb64b
Keyboard light: Fix the physical keyboard not light when it's visiable.

Change-Id: I595afd3cb6b422a17ae0f6ec20aa51979db13810

Conflicts:
	core/java/android/os/PowerManager.java
	services/java/com/android/server/power/PowerManagerService.java
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.

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

Change-Id: I66ebc2d881438f5b51db77eaa885421e65a7da0d

Conflicts:
	core/java/android/os/PowerManager.java
Keep keyboard lit until the screen is dimmed

Do not use button timeout for keyboard (which is intrusive on QWERTY
sliders). Keep it lit until the screen dims instead of turning it off
like the buttons after 5 seconds. Also consider setting keyboard
visibility as a user activity.

Conflicts:
	services/java/com/android/server/power/PowerManagerService.java

Change-Id: I32ea85ef558a5d3b5047695464e4172d24b3121d
Factor out preference-in-storage check to overridable method.

Change-Id: I2fff3192802f8a180330fda66388eda394334a5a
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54
[2/2] Permit home button wake to be configurable

Change-Id: Ie52247d5c23c8f840ababc880dd41992049cefd1

Conflicts:
	core/java/android/provider/Settings.java
Merge branch 'jb43-legacy' of https://github.com/ParanoidAndroid/android_frameworks_base into PA