[1/2] Add network stats to status bar

Also includes
http://gerrit.aokp.co/#/c/13356/
http://gerrit.aokp.co/#/c/13360/

PS2:
Get the time delta between updates and use that to show
average bytes per second.

PS3:
Code cleanup, change default text color and size to fit
AOKP and add ability to change text color.

PS4:
Fix up layout for cleaner spacing and add for tablets

PS8: Moved indicator before status icons

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/slim_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java

Change-Id: I86f37241d0f6217e9076b7d81bb19336e60a5a77
Network stats: Improved codes

* Format speed text using Formatter.formatFileSize
* Set speed text to empty if speed below 1 KB
* Don't do unnecessary things if network stats is disabled
* Address appropriate task for each intent
* SettingsObserver should only observe settings part

Change-Id: I02f7bbb3f911569d2227e3df21e5c72456a157c4
[View] Clear Hardware-Layers before system destroys HardwareRenderer​.

Symptom: Sometimes HardwareLayer display is corrupted.

Root Cause: In some cases, ViewRootImpl destroys HardwareRenderer​ without
clearing HardwareLayers in the view hirarchy. If the system trims memory fully
and kill the glContext at the same time, HardwareLayer may corrupt.

Solution: Clear Hardware-Layers before system destroys HardwareRenderer​.

Reproduce steps: Modify the cache's trim memory mechanism to make it easier to
trim fully, HardwareLayers implemented in app will easily be corrupted.
Modification of the cache is not required but make it easier to reproduce.

Change-Id: If57c802cdacf8dc37cbbcc199e74f9482834f981
Add new ActivityManager.isLowRamDevice().

This and the old isHighEndGfx() is set up through a
device configuration, rather than trying to compute it
automatically.

Change-Id: Ibc95c05791023a7ae6c88555b75bb61f2b613991

Conflicts:
	core/java/android/app/ActivityManager.java
	services/java/com/android/server/am/ProcessTracker.java
Make "low ram device" a readonly system property

This lets components outside the Zygote / Android resource regime
know whether this is considered a "low ram" device.

Set the property [ro.config.low_ram] to "true" if the device is to be
considered low-ram.  Any other property string (or its absence) will
be interpreted as meaning this is a normal larger-ram device.  The
"true" string must be all lower case.

Bug 10131789

Change-Id: I15332d169b4aa4eaa0a6c1952787af0b03d23a6b
Memoize activity manager graphics acceleration check

also account for devices without hardware rendering support

Change-Id: Ib400d85a261d9c5d0fd5770d6cda5f61832cba6b

Conflicts:
	core/java/android/app/ActivityManager.java
ActivityManager: Rejigger HighEndGfx: only propget/stringcomp and resget once (in isHighEnd, rather than constructor)

Change-Id: I6ec977a9e8c7f46b186594c7bf6cad6a690121c9

Conflicts:
	core/java/android/app/ActivityManager.java
Memoize memory class lookup methods

These methods are commonly accessed.  Lets make sure we only do systemproperties lookup
once since these values aren't changing afterwords.

Change-Id: I77802ed367e4180f4d97e6abbd98170e6cf7a0d4

Conflicts:
	core/java/android/app/ActivityManager.java

Conflicts:
	core/java/android/app/ActivityManager.java