Add back for notifcation lights

Change-Id: Ib206d313c539eccee17ad627a6e6ae87447b9bd1
Framework: Port CM9 features to CM10

This commit includes:
 - Power menu Reboot
 - Power menu screenshot
 - Profiles
 - Lock screen Calendar
 - Lock screen Weather
 - Notification light customization
 - Battery light customization
 - IME Selector notification toggle
 - and a few more things to support Settings

hange-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb

Conflicts:
	core/java/android/app/ContextImpl.java
	core/java/android/app/Notification.java
	core/java/android/preference/VolumePreference.java
	core/java/android/provider/Settings.java
	core/java/android/view/WindowManagerPolicy.java
	core/java/com/android/internal/widget/LockPatternUtils.java
	core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
	core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
	core/res/res/layout/keyguard_screen_tab_unlock.xml
	core/res/res/layout/keyguard_screen_tab_unlock_land.xml
	core/res/res/values/arrays.xml
	core/res/res/values/config.xml
	core/res/res/values/public.xml
	media/java/android/media/RingtoneManager.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardStatusViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardViewMediator.java
	services/java/com/android/server/BatteryService.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/VibratorService.java
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/drawable-hdpi/ic_lock_reboot.png
	core/res/res/drawable-mdpi/ic_lock_reboot.png
	core/res/res/drawable-xhdpi/ic_lock_reboot.png
	core/res/res/values/arrays.xml
	core/res/res/values/config.xml
	core/res/res/values/strings.xml
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/power/ShutdownThread.java

Change-Id: I1a0abd23c6f2a1e032d4a97366bd1b7cf066f850
Signed-off-by: DHOMD <DHO@dho.im>
NotificationManager : Rebind the notification listeners onChange

Rebind notification listeners when list of listeners change.

Change-Id: I7a14dacdf7a44a3bd71d28748a70d751507230df
Keep on notification LED while dreaming.

hange-Id: I407e34f9c60d3140f78abca133b4fda5dd45f311
JIRA:CYAN-689

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Change-Id: I2182094ff07a7acdce59f6c47b589605a019616f
Signed-off-by: DHOMD <DHO@dho.im>
NotificationManagerService: fix typo on led off time variable

Change-Id: Iade96474c26dbeb3a5a671170f563220562d9b3c
Fix up notification LED behaviour

- Commit 5713307e3d2eb457ba148df3683ad09733727506 (in ICS) attempted to
  fix the problem that the notification LED wasn't reenabled after
  turning off the screen again, but introduced another bug in the
  process: If another pending notification with LED at the time when the
  notification with the new magic flag introduced by that commit (which
  was used by phone and MMS apps) was active, the LED still wouldn't be
  turned on at screen off time. Also, this commit didn't handle locking
  correctly.
  This commit essentially reverts 5713307e and makes sure the LED is
  reevaluated when the screen is turned off again.

- This change also makes the assignment of the LED when multiple pending
  notifications want to use the LED more clear: The notification with
  highest priority gets the LED. If multiple notifications with same
  priority exist, the most recent one gets the LED.

JIRA:CYAN-652
Cange-Id: I1df0b40cca2af7a08c240677d22d2a95097b7184

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Change-Id: Iab5756d1252efb4c8276e2f0d620c713319bb465
Signed-off-by: DHOMD <DHO@dho.im>
Fix Quiet Hours not muting notification sounds

4.2.2 touched the NotificationManager service, and some logic went missing in the merge it seems.
This should take care of it.

Change-Id: Ib3b88c83d2936871fbe25f1acbd10fd60c577944

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Framework:  Fix security exception

Cange-Id: I4fa1f55c8209e6890b6cea13b0ed4d781f9f615d

Conflicts:
	services/java/com/android/server/BatteryService.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/VibratorService.java

Change-Id: Iac22f4ffc3b5bd1cc67d0a3bb542293f374962ee
Signed-off-by: DHOMD <DHO@dho.im>
Framework: Enable multi-user support for Notification light

Change-Id: I4fb84fdb0c9e1592c2a421011c303a789cde8c8c

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Framework: Enable multi-user support for Quiet Hours

Change-Id: Ica967ff6bf5842a08421583449876ba73de13d51

Conflicts:
	services/java/com/android/server/BatteryService.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/VibratorService.java

Signed-off-by: DHOMD <DHO@dho.im>
Framework: Remove orphaned Theme related code

Change-Id: I930d4cc75e655c5bc37532e6a1425d27bd1ee661

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Framework: Forward port Fixes

1)  NPE in Power penu

This fixes the NPE when the Reboot item is disabled and the Profiles
switcher is not

2) NPE in notification manager if profiles disabled

No active profile group is returned and a NPE is triggered when a
notification override is being set

Change-Id: I5fa003ce08daf5ef86ddeca5d432dcea2e34a718

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Squashed commit of the theme engine support.

Updated 4.2 support for the old T-Mobile theme engine, as usual
needs the provider and switcher apps installed as well.

I'm finally dropping the 400+ commit history on this, since everybody
else keeps picking it up from CM as a single patch anyway... But
for the record, nothing of this would be possible without Josh, Ed,
and the rest of the TMo guys who wrote and maintained it until 2.2:

amit chabra <amit.chabra@t-mobile.com>
Amit Kohli <amit.kohli@t-mobile.com>
Chris Cogar <chriscogar@t-mobile.com>
Dirk Sigurdson <dirk.sigurdson@t-mobile.com>
Ed Carrigan <edward.carrigan@t-mobile.com>
Gaurav Sharma <gaurav.sharma3@t-mobile.com>
Hui Feng <hui.feng@t-mobile.com>
John Ritz <john.ritz1@t-mobile.com>
Josh Guilfoyle <josh.guilfoyle@t-mobile.com>
Mark Roberts <mark.roberts48@t-mobile.com>
Pankaj Kumar <Pankaj.kumar6@t-mobile.com>
Samuel Cheung <samuel.cheung@t-mobile.com>
Sergey Ten <sergey.ten6@t-mobile.com>

Cange-Id: I7148d51be48f28a2dc4bdf9ec9018f04b268ffc4

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Change-Id: I2274a24c8e577a9ed8aecd677113222bd2a9ff31
Signed-off-by: DHOMD <DHO@dho.im>
Framework:  Fix security exception

Change-Id: I4fa1f55c8209e6890b6cea13b0ed4d781f9f615d
Underps

Conflicts:
	core/res/res/layout/keyguard_screen_tab_unlock_land.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I4b5a46cefdeffa40abb42013aae7ecd247b47b69
Signed-off-by: DHOMD <DHO@dho.im>
Fix various broken bits from the rebase

Change-Id: I2db072751de7d4e583594774b1bfa0c2a65ebf8a

Conflicts:
	core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
	core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Signed-off-by: DHOMD <DHO@dho.im>
SystemUI: Reinflate on theme change

Reflect the updated assets immediately once the config_changed
notification happens

Change-Id: I480a719fbdd45875277871af39ce65849918ec0a

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
AssetAtlas: Fix NPE when there are no preloaded resources