Lockscreen Notifications [1/2]

My try on making notifications easily accessable from lockscreen.
Credits to ChameleonOS, I got the notification listener permission and some small other stuff from their ActiveDisplay implementation.

Lockscreen Notifications allow you to manage all your notifications directly on the lockscreen.

Features:
- Pocket mode turn screen on when phone is pulled out of pocket and turn it off when phone gets back in pocket
- Hide low priority notifications
- Hide non-clearable notifications
- Allow dismissing even non-clearable notifications from lockscreen
- Just turn screen on when there's currently a notification pending
- Toggle between expanded and normal notification view by longpressing
- Wake on new notification
- Configure notification count displayed at once
- Privacy Mode: Hide notifications content on secure lockscreen.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button, does not dismiss on going notifications, they must be swiped away

Overlay setting:
dynamic width is disabled by default, to enable it for a specific device, add
<bool name="config_lnDynamicWidth">true</bool>
to yourdevicetree/overlay/frameworks/base/packages/Keyguard/res/values/config.xml

PS3: Disabled by default
PS4: Removed many whitespaces

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Signed-off-by: kecinzer <kecinzer@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
	packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
	packages/SystemUI/res/layout/navigation_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Remove double tap status bar to sleep

PS 2: Removed duplicate backup file

Change-Id: Ib8ebd844e82923d79785eba24685a325c07b3a68
Add Android L NavBar Icons

Change-Id: I80675edb70ffff14ef15119f3b8dde11233b9acb
Revert "Add Android L NavBar Icons"

This reverts commit 781194d6e38cd3f1659dd8a6c74875964a7ede43.
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
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
Revert "fb: add remote view tile (1/2)"

This reverts commit c8d4b916620d608b5e1bb720e9db2e42c7724eac.
Framework: Quiet Hours System Sounds (1/2)

Change-Id: I52c79a9fec98b5c75f88fc644766e830d5f6148e
Add Android L NavBar Icons

PS 3: Try to fix Pie icons

Change-Id: I80675edb70ffff14ef15119f3b8dde11233b9acb
Revert "Remove double tap status bar to sleep"

This reverts commit b50db9354d314fce321c73e76386313844a58d99.
Don't read configs on every touch event for double tap to sleep

Got the idea from Dave Kessler - VanirAOSP

Change-Id: Ice60896dbd0bcd2de1dbff07baa7bf60af0cad58
[1/2] Statusbar: Make double tap gesture configurable

Change-Id: I6864f54bd4fa1616910135efd82015e9d8c08659

Observe double tap gesture setting changes

Change-Id: I51f0e909c1c62eb860297cbdf26cffdb92969a60
Merge remote-tracking branch 'SlimRoms_frameworks_base/kk4.4' into kk4.4
Merge remote-tracking branch 'SlimRoms_frameworks_base/kk4.4' into kk4.4
Heads up: option to disable in lockscreen (1/2)

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: Ib002ebf52ee834968765f9a00356ee45a85adc1e
fb: add remote view tile (1/2)

Thanks CM for the base for it....just adapted it to our QS

Change-Id: Ied1dc1191e8aacb579046413dc2b12b1a634367f