[1/2] fb: Change density on the fly

Change-Id: I7ee16d32ee882fea22367f49f69f4da744f3aa45

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.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

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:
	packages/SystemUI/res/values/liquid_strings.xml
	services/java/com/android/server/NotificationManagerService.java

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

Conflicts:
	core/java/android/content/Context.java
Fix a NPE when putting a null-Bundle in an Intent

Happens frequently e.g. with GoogleAccountAuthenticator

Change-Id: I284bf153f40ee9cc3e70bce6efcc3b9e6706361b
Sensor: Enable the motion accelerometer for screen orientation change

The screen orientation can be detected by the motion accelerometer
instead of generic accelerometer to save power.

Change-Id: Iaeb3e5958d2ef7cc33080d7091ed8a5462695c67

Conflicts:
	core/res/res/values/config.xml

Conflicts:
	core/res/res/values/config.xml

Conflicts:
	core/res/res/values/symbols.xml
Remove unused frameworks base imports
Custom system animations (1/2)

Ported from here: http://gerrit.aokp.co/#/c/12304/

Thanks to Steve Spear

Change-Id: I38bc7b83edaff3c455f0dfe3ea5ede54a20ae07c

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/cm_strings.xml
	core/res/res/values/symbols.xml

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

Conflicts:
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/liquid_strings.xml
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/res/res/values/liquid_strings.xml
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/res/res/values/liquid_strings.xml
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/res/res/values/liquid_strings.xml

Conflicts:
	core/res/res/values/liquid_strings.xml
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/res/res/values/liquid_symbols.xml
FWB: IME animations (1/3)

Original from here:
Keyboard Animation https://github.com/zst123/XuiMod/commit/975cd531a9a847769b2af306495643a55ec44aaa
thanks to zst123 for patches

Patch destiled from here:
https://gerrit.omnirom.org/#/c/4251/37

Change-Id: Ie530898e851f1ffb289a290597f534f662c08847

Conflicts:
	core/java/android/inputmethodservice/InputMethodService.java
	core/java/android/provider/Settings.java
	core/res/res/values/arrays_custom.xml
	core/res/res/values/symbols_custom.xml

Conflicts:
	core/res/res/values/liquid_arrays.xml
	core/res/res/values/liquid_symbols.xml
Improve detail message for X509TrustManagerExtensions argument validation

Bug: 13728564
Change-Id: I03d08babcdc0d11baff5e76a339b4285e92edee8
Fix SSLCertificateSocketFactory.getDefaultCipherSuites.

The method was returning all supported cipher suites instead of the
default ones only. The default list of cipher suites actually used by
sockets created by this factory is not affected by this issue.

PS2: Rebased

Change-Id: I2e4d7c6547fcb29ff7a0943bc8791706cc8d22bc
Update LinkProperties with MTU value

Use the MTU provided by network as part of Data Call Response.
If it is not present, use the static value from config file

Change-Id: I9d03cc9b355d09a93883fbf4ddc93fae0077641c
CRs-Fixed: 634747
Connectivity: Set TCP delayed ACK and User Configuration Flag

Provide a Mechanism to set tcp delayed ack settings from
Connectivity Service. The tcp_use_userconfig flag is set to
override the default tcp delayed ack configuration in tcp stack.
tcp_use_userconfig flag is reset when the TCP stack is required
to use default delayed ack settings. Currently the delayed ack
settings are overridden for Wifi and LTE networks only. Other
network types continue to use default delayed ack settings

Change-Id: I282ef0f6b6278b6efcef3870242974f7ee93e508
CRs-Fixed: 628139

Conflicts:
	services/java/com/android/server/ConnectivityService.java
Check for null in LocalSocketImpl.SocketInputStream.available()

Calling available() on a local socket after close() will cause a native
crash. Other methods that pass LocalSocketImpl.fd to native code copy
the fd and check for null.

Change-Id: I2d0b573f34ae47a23009760bbb1c02933ab0a20e
card emulation patch port to JB

Change-Id: I73fe9aa30830951ea5b9d44e9a9bf83cb720e567
fixed inconsistant define values with android_nfc.h

Change-Id: Idccd2de60caf7b72839d158b39d14e2cfcdd5fc7
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
[1/2] Frameworks: Wakelock Blocker

Change-Id: Id4fd1d8da6ed40517094a5a156f7c6fea622e985

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	services/java/com/android/server/power/PowerManagerService.java

Conflicts:
	core/java/android/provider/Settings.java
Multi-user support for phones

Allow multi-user support on devices that previously didn't have it without
hard-coding it on.

ps2: Give it the nuclear touch.
ps3: Correct initialization.

Change-Id: I376f3f51ee1d8843d0977384101f93e23e278c97

Conflicts:
	core/java/android/provider/Settings.java
Base: fix MultiSelectListPreference NPE

Error AndroidRuntime 25851  Caused by: java.lang.NullPointerException
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.onGetDefaultValue(MultiSelectListPreference.java:212)
Error AndroidRuntime 25851         at android.preference.Preference.<init>(Preference.java:268)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:69)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:90)
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.<init>

also Cleanup whitespace :/

Change-Id: I3f0a1fba8f6651522e4f0c4e4750b2ce0042314f

Conflicts:
	core/java/android/preference/MultiSelectListPreference.java
Cleanup alot of preference whitespace
PreferenceFragment : Set title if specified

Set the title of the preference activity if specified by the
preference screen.

Example of where it is broken :

Settings -> Accessibility
Title says "Accessibility", but preferencescreen's android:title attribute
specified "Accessibility settings"

Change-Id: Icc89cf6bc37e3f6fc98c6bc05a0ef47185daa52c