Framework: Add Power Widget (Phone)

This commit adds the Power widget for phones.  All toggles should work
except for LTE (disabled for now)

Change-Id: I17669420d9db9a347af182fc398c6426e18534f4

PowerWidget: Make widgets stationary like everything else in the tray

Before patch: widgets move up with the grab bar (and get smashed a bit)
https://dl.dropbox.com/u/1077120/Android/Screenshot_2012-09-13-18-19-39.png

After patch: widgets disappear behind the grab bar, like everything else
https://dl.dropbox.com/u/1077120/Android/Screenshot_2012-09-13-18-23-52.png

Change-Id: Iedded9c4ba89bb5284a8b8cd0e48be8e0cafa01d
Modified Quicksettings to act just like Power Widget. Fixed Power Widget Sleep toggle with the help of Danesh M and David van Tonder

The code for QuickSettings has been rewritten using quicksettings.QuickSettings and QuickSettingsController classes.

Patch set 1-15: 	Original commits
Patch set 16:   	Re-arrange button order
Patch set 17-20:	Rewritten toggles

Change-Id: I7dcdca925970d816671e60ee01f393d71ce36581

Original commit to cm-10.1 from DvTonder

Conflicts:
	core/res/res/values/public.xml
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Strings for Power Widget

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

Conflicts:
	core/java/android/provider/Settings.java
	telephony/java/com/android/internal/telephony/ITelephony.aidl
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
Modified Quicksettings to act just like Power Widget. Fixed Power Widget Sleep toggle with the help of Danesh M and David van Tonder

The code for QuickSettings has been rewritten using quicksettings.QuickSettings and QuickSettingsController classes.

Patch set 1-15: 	Original commits
Patch set 16:   	Re-arrange button order
Patch set 17-20:	Rewritten toggles

Change-Id: I7dcdca925970d816671e60ee01f393d71ce36581

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_vibrate_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_vibrate_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_vibrate_off.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_vibrate_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_vibrate_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_vibrate_on.png
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
Framework: Quick Settings customization (Part 2 of 2) WIP!

This commit will alow loading the Quick Settings tiles layout from
a layout that is configured in Settings.

Patchset 3 - Restore Settings tile to AOSP location

Change-Id: Id4e4353dee68b8ca434dfa64d1f88737792a2e28

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
QuickSettings : Dismiss keyguard upon ActivityLaunch

Dismiss keyguard if launching activity

Change-Id: I850d719c188faf9e3e06c3944287d817cdacbdd6
QuickSettings : Add torch tile

Patchset 2 : New torch drawables (Björn Lundén)

Change-Id: I0831266d503195ee249a85d0d728bdae321e56cd
QuickSettings : Add longpress for Torch Tile

Add long press capability to torch tile + Fix string mishap

Change-Id: I760c54b9abfe5e549a29b0f06660a6bf84f1d200
QuickSettings : Wifi-AP Tile

Patchset 2 : Cleanup
Patchset 3 : More cleanup and old comment removal
Patchset 4 : Switch to the WifiManager rather than Power Widget
             Better state handling between WiFi AP and WiFi
             WiFi now turns on again if it was on before
Patchset 5 : Revert Power Widget change from Ps1, no longer needed

Change-Id: I5bd59df37ed3094f5ba253a97fd86aa426b98b39
Quick Settings : Fix Sound tile

This commit removes the deprecated VIBRATE related code and uses
the proper 4.x api/settings to toggle the ringer states.  It also
now shows the proper state on reboot.

Patchset 2 : Remove deprecated (non functioning) VIBRATE_IN_SILENT

Change-Id: Iec3e59e79c7ed686f8ff33f9cfdeb892ff70b151
QuickSettings : Auto-rotate toggle fixes

Use RotationPolicy to avoid unecessary code and stay consistent
with rest of the system.

Change-Id: Id3532c10db5f6fc9c2a97ffb809c2c3674f16918
QuickSettings : Dismiss notification panel upon toggle

Automatically dismisses the notification panel after selecting a toggle,
if the option is enabled.

Patchset 2 : Rename to "panel"
             Rename onclick/onlongclick to mOnClick/mOnLongClick

Change-Id: Iaf211db99e45ef464cbc59aa2ee26899f1e44d22
QuickSettings: Added ProfileTile (2/2)

- Adds the option for a Profile Tile to System settings
- Profile tile will show selected profile
- On click a profile selection will pop up

Patchset 2:
  Using blundens profile png resource
  fixing broadcast
  adding longClick action to updated system settings
Patchset 3:
  only show tile, if profiles are enabled
Patchset 4:
  removed reduntant check
  removed reduntant parameter from constructor

Change-Id: I74548af63531a245c700cc5b50f97919de7cfcf8
QuickSettings: New icons better matching stock

There icons should match the stock feel a bit better
in terms of size, design and color.

Change-Id: I1c8e6af9e48569e1c227c081495f70607cfe6d2b

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_vibrate_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_vibrate_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_gps_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_gps_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_vibrate_on.png
Framework: Switch to the new 4.2 handling of public symbols
With 4.2, non-api public symbols are now kept in the symbols.xml
file and no longer in the public.xml file.  This commit moves the
CyanogenMod required symbols to the proper file.

Thanks to PawitP for pointing it out

This commit was to cm-10.1 were just following suit to everyone else here.

Conflicts:
	core/res/res/values/public.xml
	core/res/res/values/symbols.xml

Change-Id: Id5685d79f54e9586dc67519748f036dd87561b17
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
Quick Settings: Add Network mode tile (part 1 of 2)

Tile drawables credit to Bjorn Lunden

Patchset 1-4 : Initial commits
Patchset 5   : Fix state not showing properly
               Remove old comment
Patchset 6   : Fix comments per Jesús David

This commit also inlcudes a bit of code cleanup and sets the
default tiles to AOSP defaults

Change-Id: I15371989bb2ce977d1b715e52d9c92c27ea108ca

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_2g_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_2g_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_2g_on.png
QuickSettings : Cleanup receivers/observers

This patchset borrows the idea of a central observer/receiver
from powerwidgets. This way cleanup is a lot easier.

Change-Id: I09ff3118cbc1137e2569dcd3e07acb2a3b083eca
Quick Settings: Add 'OFF' text to GPS tile when off

Change-Id: I8a81e3cf8419a6c2e4305c844b5f6162ed14055d