HOVER [1/2]

Notifications refined:
The way you handle with the incoming notifications defines how much you enjoy your device.
Hover shows you those notifications when you need them in a beautiful card that briefly appears
on your screen. For a detailed look of the notification, you can swipe down to expand some more
info, or you can tap it to open the related app using PA’s floating mode.

Introducing Hover:
https://plus.google.com/107979589566958860409/posts/DC4KyDd1cDC
https://plus.google.com/107979589566958860409/posts/BtWoGpNd8Fq

This is revision 4 of the original base by @D4rKn3sSyS . Hover works by moving the
notification view from statusBar container to Hover’s one and re-themes notifications
in the process. When hover is active it is the owner of the view, special care must
be taken to not  manipulate the statusbar reference while hoveris active.
Hover’s view state is managed by a handler based timer. When any touch event is received
or a gesture completed the timer is restarted, upon expiration of the timer hover is
hidden or will show next notification in the list if there is one (or more) to show.
The timer along with animation listeners  regulates the rate at which Hover can process new
notifications, acting as a spam filter for noisy applications. Upon first run a dialog is
displayed explaining Hover to new users. More infos in code’s documentation.

Todo:
- Swipe up to dismiss only the hover window not the notification in status bar.
- Transparent support has been tweaked a bit but needs a more proper solution
- Edge gap fix for Theme Engine themes overriding notifications draws
- Long press action(s)
- MInor tweaks noted in the code’s comments

CONTRIBUTORS:
@D4rKn3sSyS
@BigBrother1984
@Anu6is
@beerbong
@aaronpoweruser
@David96
@linuxman94

Drawables by @arzbhatia

Signed-off-by: Jesus David <jesdga95@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Signed-off-by: Curtis Mayers <curtis.mayers@gmail.com>
Signed-off-by: Yamil Ghazi <stevewatersy@gmail.com>
Signed-off-by: Aaron Gascoigne <atlrudeboi1@gmail.com>
Signed-off-by: David L.-W. <david.leppla.weber@gmail.com>
Signed-off-by: Evan Anderson <evan@thelinuxman.us>

Change-Id: I9c2adbf1045665f9d42cd276498e45af21c91042

HOVER: Fix a couple of things:

- Handle Ticker properly. Update mTicking, call related statements
  and disable ticker for blacklisted apps only when hover is off.
- Remove a bad patch when you release your finger, there is no need and
  along with showCurrentNotification() call at setNotification() can even
  be a bad call.
- Notification removal is already done at BaseStatusBar. Remove useless code.

*** SUMMARY ***

modified:   core/java/android/app/INotificationManager.aidl
modified:   core/java/android/provider/Settings.java
new file:   packages/SystemUI/res/drawable-hdpi/ic_notify_hover_normal.png
new file:   packages/SystemUI/res/drawable-hdpi/ic_notify_hover_pressed.png
new file:   packages/SystemUI/res/drawable-xhdpi/ic_notify_hover_normal.png
new file:   packages/SystemUI/res/drawable-xhdpi/ic_notify_hover_pressed.png
new file:   packages/SystemUI/res/drawable-xxhdpi/ic_notify_hover_normal.png
new file:   packages/SystemUI/res/drawable-xxhdpi/ic_notify_hover_pressed.png
new file:   packages/SystemUI/res/layout/hover_cling.xml
new file:   packages/SystemUI/res/layout/hover_container.xml
modified:   packages/SystemUI/res/layout/status_bar_expanded_header.xml
modified:   packages/SystemUI/res/values/kang_arrays.xml
modified:   packages/SystemUI/res/values/kang_dimens.xml
modified:   packages/SystemUI/res/values/kang_strings.xml
modified:   packages/SystemUI/src/com/android/systemui/ExpandHelper.java
modified:   packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
new file:   packages/SystemUI/src/com/android/systemui/statusbar/notification/Hover.java
new file:   packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverCling.java
new file:   packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverLayout.java
new file:   packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverNotification.java
new file:   packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHelper.java
modified:   packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
modified:   packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
modified:   packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
modified:   services/input/InputWindow.cpp
modified:   services/java/com/android/server/NotificationManagerService.java

Change-Id: I56627735307833020bd37b645c8d5bda4e6cddbd