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
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

Change-Id: I18c5fb8217596a1a3615985419be4ef12513021f
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>

Needs : http://review.pac-rom.com/2810

Change-Id: Id17b57e2f4d3a9f5cbdf3e498fbb59c656a2df39
HOVER: Ensure to clear after reparenting all notifications

Change-Id: I2ee0540a7acd13a24e38d6556fb64960e3286059
HOVER: Options to exclude non-clearable and low priority notifications [1/2]

Change-Id: Ica59f426da779509bde10469a634aa5955734360
Master switch to disable Hover [1/2]

Change-Id: I3f6d3d0b08f95dc11163a70feef34764737045dd
HOVER: Theme Engine compatibilities and some resources tweaks

Use default notification dimens, avoid setting a custom one.
A bit of cleanup too.

Notifications:
Hardcode dimensions to android defaults. Avoid themes to change them,
Ribbons feature (present on CM based roms mostly) needs that.

Thanks to +John Xionidis to help me trick this out for full CM11 made themes :)

Change-Id: Ibbd4c6ab978a9bb94e41986260ae896af549f379
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
HOVER: Don't treat touch outside event as true if is animating

- It needs to wait animation to be finished to start listen for touch outside
  and runs hide timer.

Change-Id: I1337df6a74fb40b956ae37656c72fabc7c9fd18e
HOVER: Respect screen limits when adding view

As for what @Decad3nce reported here http://review.cyanogenmod.org/#/c/66654/
we shouldn't keep FLAG_LAYOUT_NO_LIMITS so view doesn't exceed the screen limits.

Thank you Adnan :)

Change-Id: I12ab9c5e95a5e598992fb267852854dfd436eecd
HOVER: Option to exclude topmost app [1/2]

Originally taken from Tigger2014:
https://github.com/Tigger2014/android_frameworks_base-1/commit/5af0e1c84e86e9b4e6947163aaf58e9ab541079d

Change-Id: Ibb72b23f5c540d2009d42c40e13c85dc386d7e7f
Hover notification timeout [1/2]

Allow user to set how much time the hover notification will stay visisible without touch the screen

Change-Id: I4cd9ddb622b49fa9b553f6c259ce3b6a8407e13d
HOVER: Option to disable HOVER-Button in StatusBar [1/2]

If the button is hidden, user can activate Hover in the Settings instead

Change-Id: I037d6f5cdbb239dd5d97e48e6f084607934afe8d
HOVER: Option to only show up in Fullscreen-Mode [1/2]

Change-Id: I285ea1962a5094f864fe2b53648b0939722fc282
HOVER: Disabling HOVER isn't necessary at all [1/2]

as we can just hide the HOVER-Button in StatusBar

Change-Id: If2f5471161506bd33dcf21600ee504be3db10016
HOVER: Match notification width on tablets too

PS1: fix hover_tablet_width

Change-Id: I23754a888b99dc67239b8209bd285694e2f5d779
HOVER: Rework showing behavior on tablets

- Don't animate out statusbar on tablets
- Cleanup

Change-Id: Id6589b5defdc3112de799513479245c6edf5ed9b
HOVER: Don't process and/or show foreground app notifications

- Don't show notification of foreground app
- Animate the ticker in this case so user can see it

Inspired from changes linked here https://gerrit.paranoidandroid.co/#/c/4453/10

PS2: small fix error

Change-Id: Ie68fd296a348e70f9c13dfb1f4eee39228845462
VolumePanel: Rework design on top of Hover

Signed-off-by: David L.-W. <xD_e-mail@gmx.de>
Change-Id: Icbc62f9a3331855b90603d121909935b6d763f04
1/2 Base: implement app circle sidebar
2/2 Base: App circle sidebar (add support floating window)