SystemUI: show statusbar icon if quiet hours is active

Reflects the 3 active modes we provide as status bar icon, similar to
android L.

Change-Id: Ic32242b0843f44de72174ee768ef04ee0f4535aa
fb: Show heads up at the bottom of the screen (1/2)

Due of user requests and indeed especially on hw key devices for a better
workflow we add an option to show heads up notifications on the bottom instead
of the top.

Animation we leave as is due that if it slide from the bottom into the screen it happens
to often that the user accidentaly interacts with it. If it comes from the top of the
container we add, the user has enough time to realize it. Sometimes a ms can make a big difference.

As well this commit fixes the wrong gap on the top if user boots up directly
into immersive mode.

PS:
- if IME keyboard is showing show the heads up on the top to do not disturb the typing.
PS:
- NPE if updatePosition is called to early from the system.

Change-Id: Iea7fbe466808531a9351cf4048570b8f56eb698e

Conflicts:
	packages/SystemUI/res/values/slim_dimens.xml

 Author:    Lars Greiss <kufikugel@googlemail.com>
Skip broadcasting to a receiver if the receiver seems to be dead

If an application that has a broadcast receiver is killed
during broadcasting, thread variable of ProcessRecord becomes null
so that IIntentReceiver#performReceive() is called
in BroadcastQueue#performReceiveLocked(). But if binder driver has not
noticed the death of the application yet, it can't throw
DeadObjectException. After that, binder driver notices. But it can't
notify DeadObjectException to the caller because performReceive() is
async call. So broadcasting keeps on waiting for finishing
performReceive() until timeout.

This change checks the death of the application before calling
performReceive() and skips broadcasting to the receiver
if the application has already died.

Change-Id: Ifa02b8b1a7e7b6fd314de90fedff5b7a5326825d
[HWUI] Fix invisible views are still shown in popup window

Symptom: Invisible views are still shown in popup window

Root Cause: glClear isn't called if there is no draw command

Solution: Even if there is no draw command, it still calls glClear
          by startFrame().

Reproduce steps: App set one view in a popup window to invisible,
                 it will be still visible.

Change-Id: I36bc7b752434ad388fbb80ea63341ac778f48d35
Restore untrusted glStencilMask value on resume after functor

Fixes an issue where the stencil buffer is corrupted
(used in overdraw debugging, path clipping) when used in
conjunction with a HW accelerated WebView.

bug:15023700
bug:16465551

Change-Id: If201b503931380f7107a34e9a9a2f877a50f72b1
[Bitmap] Add null pointer protection in Bitmap_sameAs()

Symptom: SkBitmap::getAddr(int, int) may return NULL due to unrecognized config
(ex: kRLE_Index8_Config). This will cause memcmp method to crash. Since bm0 and
bm1 both have pixel data() (have passed NULL == getPixels() check), those 2
bitmaps should be valid (only unrecognized), we return JNI_FALSE to warn user
those 2 unrecognized config bitmaps may be different.

Change-Id: I6970c27de412110a3035d0a783112c4cd3ebc35b
SlimActions: add new actions and cleanup

A bit cleanup.

As well add 4 actions:

- camera intent
- play/pause music
- next music track
- prev music track
- wake up device

As well check for system ready on the other audio actions which are already present.

ToDo: One of the rare classes which are very bad documented. We need to add code comments
ASAP

Change-Id: I73bcfb6c60454de4d8494dfd846deee770022335
FB: Slimrecents background color && transparency [2/2]

Change-Id: Icf0259ce45d416364d6e7a7a8c2038f6c4c0cbde

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

 Author:    dankoman <dankoman30@gmail.com>
Fix lock screen notifications proximity sensors

Fixes pocket mode and wake on notification options

Thanks Steve Spencer :)

Change-Id: I3e7ee05be12c86ce31c2db4d8150c0f5b3c3dadc
bring in line with candyrom source
-thanks liquid
update quiethours path
-bring inline with candyrom source