Lockscreen Notifications(WIP) [1/2]

This commit base for MagicDevTeam

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
- Make offset top user configurable & add privacy mode
- Allow apps to be excluded from being displayed && respect quiet hours
- Custom background color

Credit to David96

PS:
Lockscreen Notifications: Make "wake on notifications" user configurable

and some other small changes that hopefully will improve battery live

PS:
Lockscreen notifications: make height user configurable

PS:
Lockscreen Notifications: fix possible NPE

PS:
Lockscreen Notifications: try on fixing notifications sometimes not
responding

PS:
Lockscreen Notifications: always scroll to bottom so one sees the newest
notification first

PS:
Lockscreen Notificaitons: Fix NPE while on setup wizard on clean flash

PS:
Lockscreen Notifications: several fixes

- fix notification not responding when removed and added in a short
period of time (e.g. gravity screen start/stop)
- just unlock screen on notification click when there's an activity to
start
- fix notification hide animation
- just wake screen on reposted notifications when it's not ongoing (wake
on notification before made the device stay awake for
ever wh$

PS:
Lockscreen Notifications: just scroll down in "showAllNotifications"

PS:
Lockscreen Notifications: make offset top user configurable & add
privacy mode

PS:
Lockscreen Notifications: Fix possible NPE

PS:
Lockscreen Notifications: make width dynamic (WRAP_CONTENT)

PS:
Lockscreen Notifications: make animations a bit faster

PS:
Fix ongoing notifications reappearing when hidden & some small animation
tweaks again.

PS:
Lockscreen Notifications: fix notifications disappearing on orientation
change

PS:
Lockscreen Notifications: disable dynamic width for devices <= xhdpi

PS:
Lockscreen Notification: fix default settings derp

PS:
Lockscreen Notifications: fix phone turning on in pocket

PS:
Lockscreen notifications: Allow apps to be excluded from being displayed
&& respect quiet hours

Credits to 0xD34D / ChameleonOS for the original implementation for
Active Display

PS:
Lockscreen Notifications: make dynamic width a device 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

PS:
Lockscreen Notifications: rewrite add notification logic

There were some problems with notifications getting replaced while the
user was currently dragging them.
This commit should fix that by always waiting until animations and user
input are finished before replacing a notification
view.

PS:
Lockscreen Notifications: dismiss all button, improve animations,
cleanup

PS:
Add "show all notifications" navbar button

PS:
Lockscreen Notifications: fix show/hide of show all button & fix endless
SystemUI FC when SystemUI is killed

PS:
Lockscreen Notifications: fix NPE

PS:
Lockscreen Notifications: Custom background color

PS:
Lockscreen Notifications: try to fix occasionally SystemUI FC on boot

Change-Id: Iaf2c139fa1b77325156e4068d3a95e1bae752b29