[1/2] SystemUI: Add time-context headers to the notification header

This commit adds image headers to the notification panel header,
based on the date/time. There are pictures for morning, afternoon
and night, as well as special events like Christmas and new
year's eve.
More will be coming, with eventually a way to use an external
(as in, Internet) provider for those pictures.

Change-Id: Ie3321e9a3e0637d6ba8094dd46aee36c41354713
SystemUI: Cleanup and enhance notification drawer header

- Crop properly images on tablets and landscale
- Use a separate layer instead of breaking header background
- Fix bug where you couldn't turn header back on after turning it off
- Added a gradient overlay

Change-Id: Ife399b82a3f272fb2ecc8e738c5f274f7682a556

Conflicts:

	packages/SystemUI/res/layout/status_bar_expanded_header.xml

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
NetworkPolicy: Validate policy templates before updating

Ensure all the policies to be added are validated, otherwise
this service will throw IllegalArgumentException and cause
system crash when updating network template after receiving
ACTION_NETWORK_STATS_UPDATED.

Change-Id: I3faef0ac2a2fcea64ba5dde9c9256f6714280e2e
CRs-Fixed: 561490
WifiState: Don't aquire transitionwakelock in airplane mode

NetworkTransitionWakelock is for transition from Wifi to mobile.
It will cause device no sleep for 60s. There is no need to acquire
it in airplane mode.

Change-Id: I1487dc4787948d09e482f22e88d01768b54964da
GlobalActions.java: fix soft reboot
Fix broken XML parsing idiom.

Code that expected a single top level element in an XML file
was doing something like :

while (type != START_TAG) { next(); }

This would loop forever when the XML being parsed was empty,
where each call to XmlPullParser.next() would return END_DOCUMENT.

bug: https://code.google.com/p/android/issues/detail?id=64173
Change-Id: I7543203e976a8999ae471a6c2d629249a87011bb
QS: let's welcome LocationTile to 4.4

we already modified to use the basic 4.4 location mechanism. Still
it was very basic. Now using the same attempt like in Settings to
controll location mode (high accuracy, battery saving, device only) and on/off state

longpress switches between the states. Normal click turns it on/off
Compared to settings turning on will recover last state where it was turned off. As
well it respects the sharing location warning dialog either when you switch on into
a mode which use it or you switch into a mode which uses it and it was not confimed.

Slight corrections to original AOSP code to reflect the changes in LocationController
even though this code is non operational

PatchSet:
- moved the complete handling into the LocationController. Way better
  to have in centralized. Who knows for what we will use it later.
PatchSet:
- cleanup

PatchSet:
- added drawables from kroz :)

Change-Id: I3c7c51c8d7e3a8c003c37d1b55a6503a9bbeaf64

Conflicts:

	packages/SystemUI/src/com/android/systemui/quicksettings/GPSTile.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
[1/2] SystemUI: Update network traffic indicator

Android measures the amount of data transferred in bytes,
however, by convention, data rates should be measured in bits
per second.

*Convert the change in total data and time to bits and seconds,
and then divide the amount transferred by the number of
seconds that have elapsed.

*Update the labels and have them use the correct SI prefixes.

*Factor out or add @hide to public methods and constructors

*Remove all Runnables and Messages from Handler queue when
disabled

*Minor formatting changes to stay consistent with Android's
code-style guidelines.
https://source.android.com/source/code-style.html

PS2: Set maximum digits to prevent it from filling the statusbar
PS3: Rebase
PS4: Add ability to display either bits or bytes

Change-Id: I9add610a8d14f5a48f2af0a82ced0c186224e282

Conflicts:

	core/java/android/provider/Settings.java
Revert "Remove the navigation camera icon in keyguard if disabled by DPM"

This reverts commit 8447bd81579cb54c969cd7395b508e87bf3e6dae.
Update the color of the expandable volume panel icon

This still retains the old settings icon since it
happens to fit perfectly. Pressing it does indeed
show you a bunch of sliders like the icon indicates.

Also add xhdpi and xxhdpi versions.

Change-Id: I944a325c8871e1afc9d7163b0f23f7f9d8ae070a
Keyguard: smooth background change derp fixes

no idea how this could happened. Cleanup, fixes and updates (thanks kyril)

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d
PhoneStatusBar: fix massive surface redraws due of animation race

the wifi/carrier label is animated from AOSP via an alpha animation. Problem
is that we quiet often call this on other animations and this will end in a
animation loop which forces massive surface redraws. Whatever to avoid this
do it like for notification shortcuts and set directly the alpha value which
look so or so better in the whole animation.

As well a small code cleanup

Change-Id: If620db28d9c38ce3adeeef59fdf65c6394d45f11

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Add Long-Click to Preference Tile

This will open the add tile activity like it was before in JB

Change-Id: Id1ac8f0fd18f7f2dffca56e7edf857536142a6ce
fix remaining blue dialog dividers

Change-Id: I0b4d2d0706f3393933e40d9c70b62aa3c9b68ed5