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: disable showing notification content.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button

This should still be considered as beta, even if it seems to work very well for me.

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

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	services/java/com/android/server/NotificationManagerService.java

Change-Id: Ib265516f9a2bc7fd5156d7313c96fdf362cd2442
LN: Some fixes & cleanup

- Fix bug that the notification is launched when a button on it is pressed
- Show new notifications first

Change-Id: I87db92a7ee4eb9329ec1ec69008e612a619d5c91
LN: Fix FC on launching hangouts notification

Change-Id: Idf411bd2b4995f0b53767e99597efd98ce0596b3
LN: beautify

Change-Id: I695846412f2b8c910f8a5cf48da2bf6ac42e124e
Do not launch floating window when on default launcher

We only do this when user is on the default launcher 
because if the user was on a non-default launcher,
he/she must have been there for some purpose and we 
do not want to throw him/her back to the default 
launcher incase he/she exits the app with HOME button.
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into HEAD
Themes: Update LoadedApk resources.

Instead of creating a new LoadedApk when resources are not up to
date, we use the existing LoadedApk but recreate mResources.

Change-Id: Ic1ad810863d03c2cedc751c9e84dd7c954daf3d7
Fixing parcel leaks to avoid virtual memory leak

Client has to call recycle() on parcel object after its usage
otherwise native layer of binder won't clear the resources of
parcel which were allocated for IPC

Change-Id: Ib31ddcc92aa4ebd80bb66729922b9133692e9c9e
Signed-off-by: houst0nn <houstonn@gmail.com>
Merge remote-tracking branch 'PA/kitkat' into kitkat-staging
Merge "Themes: Update LoadedApk resources." into kitkat
 Thanks david
Revert "Merge remote-tracking branch 'PA/kitkat' into kitkat-staging"

This reverts commit 61c139368bae8dc3ad4d11bc18146909790b6474, reversing
changes made to cd9836312e519ed8aa06e049014787b02398f25e.
Revert "Revert "Merge remote-tracking branch 'PA/kitkat' into kitkat-staging""

This reverts commit 66d21837c6e2da8965effb71097d159f761a6d1d.
Revert " Thanks david"

This reverts commit 324026af4373f2adb6f2c778afeedf9ac2eb54de, reversing
changes made to 61c139368bae8dc3ad4d11bc18146909790b6474.
LN: Some fixes & cleanup

- Fix bug that the notification is launched when a button on it is pressed
- Show new notifications first

Change-Id: I87db92a7ee4eb9329ec1ec69008e612a619d5c91
LN: Fix FC on launching hangouts notification

Change-Id: Idf411bd2b4995f0b53767e99597efd98ce0596b3
LN: beautify

Change-Id: I695846412f2b8c910f8a5cf48da2bf6ac42e124e
Merge "Fixing parcel leaks to avoid virtual memory leak" into kitkat
Merge "Do not launch floating window when on default launcher" into kitkat
Merge remote-tracking branch 'a/kitkat' into HEAD