Add support for Peek app

Disable built in peek when Peek app is installed. Enable it again on app's unistall.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Floating Window: Welcome back

* Port squashed jellybean floating window to kitkat.

Floating window contributors:
@drcmda
@beerbong
@D4rKn3sSyS

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Merge notification manager service changes.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: If3d6338f657915754bd6cb9cb987df62c17aa6d0
Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
Prepare NotificationManagerService for new format

* Needed for blacklisting

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I7801d65016aa949a5e2406e00871229a602829b9
Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	services/java/com/android/server/NotificationManagerService.java
Launch floating notifications from notification panel (long click)

 * Status bar - long click on notification select 'floating mode' option

fix derp in floating notification launch

Notification long press fix

Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/graviton_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: I9f02168476e3f0aec6583def28f4ca042680f35d
Recents: Launch as Floating App

Ported from JB 4.3
Based on hybrid (Aaron) and Halo (Jesus) implementation

Signed-off-by: Alexis Rico <sferadev@gmail.com>
Change-Id: I84f4d3928af5c6ddd96a9a173a1c24e85ff606dd

Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	packages/SystemUI/res/values-ca/pa_strings.xml
	packages/SystemUI/res/values-es/pa_strings.xml
	packages/SystemUI/res/values/pa_strings.xml

Conflicts:
	packages/SystemUI/res/menu/recent_popup_menu.xml
	packages/SystemUI/res/values/graviton_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Apps: Add blacklist interface [1/2]

Include peek and floating mode implementations.
Applies to every floating mode launch way.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Ica523625c9061cf9c8d6c3d7df4acf6a125c4ead
Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

fix for blacklists

Change-Id: I03a5e2c6fb5ec8087afbe6a1c02e54827988d8f8
PEEK: Beautify bridging layers code

* Save new instances for Peek and PowerManager:
    Create it only in BaseStatusBar when start() method is called. That one
    will be passed throught the sub layers such like new helper class so another
    feature can check Peek state invocking from NotificationHelper class.
* Move phone listener to new helper class.
* Do not show Peek on sim pin lock screen.
* Process new incoming notifications only if screen is off, keep updating notification array separately.
* General cleanup.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I9efde073df35b92e42b9faa9930d2fc39b3a43b9

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
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>

Signed-off-by: k2wl <kar2wlan@gmail.com>

Conflicts:
	packages/SystemUI/res/values/pa_dimens.xml
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHelper.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/input/InputWindow.cpp

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/aogp_dimens.xml
	packages/SystemUI/res/values/graviton_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Change-Id: Ie754a9ce70966541fe8e636628c5d52cfe85c333