Revert "Frameworks: Fix memory leak + cleanup"

This reverts commit 48eea3992bb534e269ec6f75df0b5fb6a9b282e5.
Revert "Battery graphical fixes"

This reverts commit 5bee17e1092e4383506f303c6a382fbd43d70777.
Revert "SysUI: Battery: properly fix color settings"

This reverts commit fc976fb6013d7074095d397c21d0496cd7e3958c.
Revert "fix for merge statusbar color"

This reverts commit 18ccfa4fd19d17508dcd416f01f2cf85710d7b89.
Revert "Status Bar Color [1/2]"

This reverts commit b57cfd976b2ea4b56f310ce1563629104a4ddca0.

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
Frameworks: Fix memory leak + cleanup

Do not create new Objects onDraw + cleanup

Change-Id: Id1dc9ae85ccf820f2047528e12c4ecdc525f12d2

Conflicts:
	packages/SystemUI/src/com/android/systemui/BatteryCircleMeterView.java
[1/2] Base: Battery Saver mode

Concept:
http://jira.omnirom.org/browse/CONCEPT-24

introduce battery saver mode
this based from what user want or what user do to saving the battery life
this include:
1. Automatically switch mobile network into what user choice and also disable mobile data IF wifi connected to an AP
2. Automatically switch mobile network and disable mobile data IF battery low (battery level can configure)
3. Reduce screen brightness based low battery (this feature will disabled if Auto brightness mode enabled)
4. Not changing network IF on Call or Usb tether enabled or WifiAP enabled
5. Not changing network IF there is Download/upload progress
6. Support For Both GSM and CDMA devices (need someone to test for CDMA devices)
7. every condition has an option :D
8. Restore all network configuration if battery saver mode disabled
9. Add Time Range to start battery saver mode
10. allow device without mobile data support, to using this feature
11. fix inconsistent battery low level
12. rewrite to better performance
13. modified the controller to support battery saver mode
14. add bluetooth, gps, wifi, and mobile data (if support) to be disabled while power saving activated
15. fix build QuickSettings because of LocationController change
16. rewrite to better performance
17. fix brightness value
18. rewrite (again) to allow add more saving mode
19. do delay changing only for POWER SAVING not NORMAL mode
20. add Cpu power saving mode
21. fix Cpu freq value
22. fix call saving state for non user configuration mode
23. fix NPE
24. add kill all task
25. add disable sync
26. add disable vibrate
27. add disable led
28. add notification :)
29. finally fix sync interval :D

preview:
http://jira.omnirom.org/secure/attachment/10394/Screenshot_2014-03-07-19-54-57.png
http://jira.omnirom.org/secure/attachment/10395/Screenshot_2014-03-07-19-55-56.png
http://jira.omnirom.org/secure/attachment/10396/Screenshot_2014-03-07-19-56-06.png
http://jira.omnirom.org/secure/attachment/10397/Screenshot_2014-03-07-19-56-14.png
http://jira.omnirom.org/secure/attachment/10398/Screenshot_2014-03-07-19-56-27.png
http://jira.omnirom.org/secure/attachment/10399/Screenshot_2014-03-07-19-56-34.png
Signed-off-by: scott <scott@ubuntu>

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

Change-Id: I9d86ef1425228e11cadd85d37c5b6e8b20e50fb0

Conflicts:
	packages/SystemUI/res/values/custom_strings.xml
	packages/SystemUI/src/com/android/systemui/BootReceiver.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	core/java/android/content/Intent.java
	packages/SystemUI/res/values/ose_strings.xml
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Frameworks: add a bunch of national roaming providers

Change-Id: I506bb2d50f8c0493e9f33ed45984627e60132399
Volumes in Settings/Sound is slow to start

There is a delay after pressing volume menu item
there is a delay until the Volume popup is shown.

The reason for this is that the initialization of
the different seekbars is slow and run in the main
thread. More specifically the call to get the
ringtone from the RingtoneManager is causing this
delay.

Moving the call to the ringtone manager to the
handler thread used to play ringtones to make
the launch of the volume dialog a bit snappier.

Change-Id: I76da0226592468debd542d67164b37b2b59897c7
Base: Check ProcessesReady before broadcast

Most of the time testIsSystemReady is used to know if we are allowed to broadcast intents.
But in broadcast intent method we check mProcessesReady flag (not mSystemReady).
If we broadcast after systemReady flag but before ProcessesReady flag, system will crash

Adding condition to check if system & processes are ready fix that race condition
Signed-off-by: Fabien DUVOUX <fabien.duvoux@gmail.com>

Change-Id: I2eec1c4f280daf29f4741919a7636b02da341e32
Insufficient ProcessRecord cleanup when persistent process is killed

When persistent process with Service restarts, ActivityManagerService
does not reset ProcessRecord#hasClientActivites to false
(because ProcessRecord of persistent process is continued using
after killing).

It disturbs updating LRU list in ActivityManagerService, and then,
when new process calls ActivityManagerProxy#publishContentProviders,
SecurityException happens because of no entry in the list.

Bug: 13517358

Change-Id: I46b064f71a4f7025ade1bf117801352a7ab22e6a
Audio: Fixed system/call stream volume can't adjust with HS connected.

Issue Description:
When headset connected, the system/voice call stream volume can't be
adjusted from Volume bar.

Root Cause:
Currently adjustStreamVolume is applied to stream type alias and the
device for the stream alias. So when headset connected and adjust
volume for SYSTEM_STREAM, the operation will be applied to RING_STREAM
(which is aliased by SYSTEM_STREAM) and speaker. As headset is returned
from getDeviceForStream(SYSTEM_STREAM), but speaker for RING_STREAM.

Solution:
Change the adjustStreamVolume to apply volume to the stream alias and
the device for the stream type exactly.

Change-Id: Icd226d9eb197017cd3c186a0096edaed755680ec
Signed-off-by: Guo Xie <gxie@marvell.com>