Base: Option to enable Notification Light when screen is on [1/2]

This makes it possible to let the Notification LED flash even when the screen is on
[1/2] SystemUI: Add brightness slider to notification drawer

adds a brightness slider below the expanded statusbar header and
(if enabled) quick settings ribbons

also wrap an if around gesture recorder in the fling methods, only
call them if DEBUG is enabled.
Over scroll effects [1/2]

Change-Id: I4cc67715f8f3bc67674782f08b9e363ee0e8ac9e
SystemUI: Replace CompassTile RotateAnimation with tweening

Change-Id: I53b2155232122ae5dbed611db3865e0ffdbde37e
On-The-Go mode

On-The-Go turns on the camera of your phone and streams it to an overlay,
which is drawn over everything.
this makes you feel like your display is transparent, as you see the content
behind it.

its really useful when you are using your phone while walking, thats why
we called it "On-The-Go"

allows to change transparency of the overlay via the notification.

have fun!

Squash in the latest from Nameless ROM

- http://gerrit.nameless-rom.org/#/c/3593/
- http://gerrit.nameless-rom.org/#/c/3594/
- http://gerrit.nameless-rom.org/#/c/3595/
- http://gerrit.nameless-rom.org/#/c/3724/
- http://gerrit.nameless-rom.org/#/c/3733/5

Change-Id: I1d9ec26063b3cd71fe12e01aeb918b7a2b4eea75
Squash of theme patches

Fix: wallpaper changes when changing lockscreen WP

Since LockscreenWallpaperPickerActivity did not override
cropImageAndSetWallpaper the homescreen wallpaper was changing
when selecting the default_wallpaper resource.

Themes: Fix icon filters clamping to wrong values

Themes: Make sure composed icon info is meaningful

We don't want to try and create a composed icon if the parts that
make up a composed icon are not valid or set.

Themes: Fix blurry composed icons

In a composed icon the original icon could be scaled incorrectly
due to a density mismatch resulting in blurry icons.

For example, Grouper has a screen density of 213 dpi but Trebuchet will want to show a larger icon and therefore
requests to the framework to load app icons with a slightly higher density of 320dpi (XHDPI bucket).

When Resources.loadDrawable(TypedValue value, ...) is called, it will use observe value.density. Since the image
is from the XHDPI bucket it will have a TypedValue.density of 320dpi, much higher than the screen's 213dpi, and therefore
loadDrawablei() will configure BitmapFactory to scale down the image to match the screen density. This is not what we want,
so this patch modifies the density value to prevent scaling, much the same way getDrawableForDensity() does.

Themes: Load missing style attributes from original style

If a theme overrides a style in an app and does not include all
the attributes found in the original, it is possible for the app
to crash because it cannot locate an attribute it is expecting.

To overcome this we need to check the attributes in the original
style's bag and add any missing attributes to the current bag being
populated.  Currently we have only seen one theme that causes this
behavior, but there could be others out there or we may eventually
see this happen in the wild as apps update and the themes have not
had a chance to incorporate the new additions from the app.

Themes: Avoid NPE when setting text in TickerView

It is possible, with the right timing, to receive an NPE in TextSwitcher
when a notification comes in during recreation of the status bar because
of a theme change.

Themes: Fix setting wallpaper from a legacy theme

Themes: Track NotFoundException on app launch failure

We should probably keep an eye on NotFoundExceptions too since they
are a common exception thrown when a bad theme is applied.

Themes: Remove listener if exception is thrown

If something goes wrong and a client does not remove itself, the
theme manager may still have a reference to the listener and an
exception is thrown while trying to call one of the listener's methods.
When this happens, we should not only log it but remove the bad listener.

Themes: Fix native crash in libandroidfw

If a missing attribute needs to be added in somewhere in the middle
of the bag, a segfault would occur because we change curEntry to a
value that is beyond the set's allocated space.  This patch stores
curEntry in prevEntry before changing it's value and memmove uses
prevEntry to index the set.
[1/2] base : disable immersive mode in lockscreen

Inspired and kanged from here: https://gerrit.omnirom.org/#/c/7807/

Modified for Slim
flip for compass and on-the-go tiles
[1/2] Base: opens music app when headset is plugged

Change-Id: Id8b7c9e9853088b4ffa3c822caac1b3f96def9bf

Conflicts:
	media/java/android/media/AudioService.java
[1/2] base: Headset plug: Disable if music is active

PS6:
-I want to understand :)

Change-Id: I7ae31121b08fbf99c32bade8df4f291a99b1abaf
base: Moves isAvailableApp and isAppInstalled to PackageUtils

Change-Id: I78494839fb2e521666fae82d2168131fa2bbd093

Conflicts:
	core/java/com/android/internal/util/omni/DeviceUtils.java
	media/java/android/media/AudioService.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
[2/2] base: Headset: headset actions improvement

Adds "Kill app" and "Move app to front"

New logic with more actions and events

Change-Id: I58cef9112c89e4c8ec625e57bdce471f1aaf881a
custom scrolling values 1/2

ported/modified from https://gerrit.omnirom.org/#/c/4251/
originally written by Yanuar Harry <ai.the.smarties.physics@gmail.com>

Change-Id: I7f23fe736507f836137c5d6dc0b5fd2ad4a95462
Signed-off-by: scott <scott@ubuntu.com>