Framework: Forward port Power widget fixes and fix disabling

This commit fixes the ability to disable/hide the power widget on CM10.1, hide
the widget by default and forward ports a few other related fixes:

Author: Danesh
1) Notification Widgets : Fix vibration
The initial value of the array determines how long till the vibration starts,
and second value determines how long to leave it on till.

Since config_virtualKeyVibePattern is in an overlay and we cannot rely on its consitency,
we check the length of the array, and based on it execute the appropriate vibration.

2) NotificationPowerWidget : Snap widgets
Snap widgets in place, rather than allowing partial widgets

3) Framework Track Control : Switch from broadcast to audio service
Ordered broadcast is unreliable. Switch to using the Audio Service's
dispatchMediaKeyWithWakeLockToAudioService as it sends the event to the correct receiver.

4) AutoRotateButton : Minor cleanup
Use setRotationLock to avoid code duplication and staying consistent with framework

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
fix power widget sleep

Change-Id: Ic9b36416076a3831243a2219b3708408705b5733
Signed-off-by: scott <scott@ubuntu>
PowerWidget: Re-enable LTE button.

- Implement toggleLTE,
  from CM 10.0: I3f7521f5ec4e9f9106c58afd4d5b10c7086b55fd.
- Support all LTE network modes defined in RILConstants and
  com.android.internal.telephony.Phone.
- Cleanup: Remove unused LTE_MODE, restrict state change to updateState.
- Also use Settings.Global.getInt() for PREFERRED_NETWORK_MODE.

Change-Id: I43bb2491d650d641d243d3cb67ee80bc7c8f5cdf
SystemUI: Use Settings.Global.getInt to read global settings

Settings.Global.getInt should be used instead of Settings.Secure.getInt
to read global settings.

Change-Id: Icf8b9b2c9f04d4a111e5cc165e090aeb996f91b1
PowerWidget: fix airplane mode toggle

Settings.System -> Settings.Global

Change-Id: Ic1a874ec694e76153d0838fdb81650fe384bae59
PowerWidget: Soundbutton bugfix

PatchSet1: Initial commit

PatchSet2: fix whitespace errors

PatchSet3: DERB!!!!!

PatchSet4: Buttons are working correctly now.

PatchSet5: whitspace errors --> I HATE VIM; need to set up Eclipse

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/quicksettings/RingerModeTile.java
bring powerwidgets up to date

Change-Id: Ia2cdeded2b132d6ce3313c1f228ba140dd5ae7be
Signed-off-by: scott <scott@ubuntu>
Revert "PowerWidget: Re-enable LTE button."

This reverts commit 6b60ff3ed7a54814f18bb117a6367bd6727c8806.

Change-Id: Ic32da0d32d8a66a16422899599f47a1bd96e6209
Signed-off-by: scott <scott@ubuntu>
couple fixes

Change-Id: Idbe18c6c91d282d4eb145b7c0934ca298d63baee
Signed-off-by: scott <scott@ubuntu>
Frameworks part: Port Reboot button in power widgets

patch set 2: removed permissions specific to Network Type Button

patch set 3: added license text

Change-Id: Idbcebcc176df133e020ff7f10d78fb6111bf38e9
Change reboot button and tile behaviour in power widget an quick settings

- Simple press -> change reboot mode (reboot system or reboot recovery)
- Long press -> reboot to the selected mode

Change-Id: I7fed20c4d31c374c6570aa85f48ea706b38006a4
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/RebootTile.java

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_reboot_recovery.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_reboot_recovery.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_reboot_recovery.png
	packages/SystemUI/res/values/strings.xml
Framework: Add Fast Charge widget - (1/2)

Change-Id: Iac753914624ce82e0ccd2a89dda66870923fa5f4
Cleanup the FastCharge power widget code and add proper icons

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/FChargeButton.java

Change-Id: I338da694edd14be0ef63c92c04415e48a1ff3010
playing with colors...

Change-Id: I7230edf9be284e62b38ec74ab9505ad79e6d59fc
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/power/PowerUI.java
don't change the background color of toggle icons for now

Change-Id: I5982d5562df0d0037b2363bd82e262aadc692e7d
additional bar below toggle icons to display state.
todo: - make it an option
- add color picker

Change-Id: I22ca85f46c30831a90b11d5b727ae9c109e55c92
more work to toggles

Change-Id: I6fbbff5a03ea99db0056459ee2a4296748fc400e
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
change toggle color logic

Change-Id: I7cad50e6f76231fee2304cd288928ef43704a374
again toggle changes

Change-Id: Iad22b3c4beb2f158e9ca82a393c5fcae903f6d6e
base: correct default enablement of battery light

Use default value from config

Change-Id: I50a0e78bf4528ee8991da41aa1fdcfaaa30b107d