Slim Recents: (add support for floating window)

Big thanks to @kufikugel for making this work
Slims Recents: fix reference to floating mode string
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

Conflicts:
	core/java/android/app/INotificationManager.aidl
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	core/java/android/app/INotificationManager.aidl
	packages/SystemUI/res/values/ose_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	core/java/android/app/INotificationManager.aidl
	packages/SystemUI/res/values/slim_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	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>
Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	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
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/liquid_dimens.xml
	packages/SystemUI/res/values/ose_arrays.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

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

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

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

Change-Id: I928bf5c42fb4a33109198475cc136bd86f11056d

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

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
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: I76e99da7a83b6a5dd35c2965b311009dfc819085
HOVER: Add QS Tile [1/2]

Change-Id: I73b41f80762cb71fa86630314891e9670b43ea87

Conflicts:
	core/java/com/android/internal/util/liquid/QSConstants.java
	packages/SystemUI/res/values/liquid_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java

Conflicts:
	core/java/com/android/internal/util/ose/QSConstants.java
	packages/SystemUI/res/values/ose_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java

Conflicts:
	core/java/com/android/internal/util/slim/QSConstants.java
	packages/SystemUI/res/values/slim_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
HOVER: Disabling HOVER isn't necessary at all [1/2] …

as we can just hide the HOVER-Button in StatusBar

Change-Id: Idde34acc859e6191a71239616b2b69f09650ef49

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

Conflicts:
	core/java/android/provider/Settings.java
HOVER: Option to exclude topmost app [1/2]

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

Change-Id: I6da9027af4c7bc74945a06b97b876f94cf817844

Conflicts:
	core/java/android/provider/Settings.java
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 :)

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

Conflicts:
	packages/SystemUI/res/values/dimens_custom.xml

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverLayout.java
Hover notification timeout [1/2]

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

Change-Id: I5847adb3f33522d9d78867685f9867477542c37e

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
WallpaperCropper: include wallpapers from themes!

Theme all the things!!!!!!!!!

Change-Id: Ie9d5d4dfe6533442188e38fa0b11742368246e37
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	packages/WallpaperCropper/src/com/android/wallpapercropper/LockWallpaperPickerActivity.java

Conflicts:
	packages/WallpaperCropper/src/com/android/wallpapercropper/LockWallpaperPickerActivity.java
Fix PackageManagerService WTF in systemReady()

This resolves the following error:
F/SystemServer(31979): BOOT FAILURE making Package Manager Service ready
F/SystemServer(31979): java.lang.SecurityException: Unable to find app for caller android.app.ActivityThread$ApplicationThread@42171630 (pid=31979) when registering receiver android.app.LoadedApk$ReceiverDispatcher$InnerReceiver@420d1130
F/SystemServer(31979):  at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:13157)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1506)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverAsUser(ContextImpl.java:1481)
F/SystemServer(31979):  at com.android.internal.content.PackageMonitor.register(PackageMonitor.java:84)
F/SystemServer(31979):  at com.android.server.pm.UserManagerService.systemReady(UserManagerService.java:237)
F/SystemServer(31979):  at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:11305)
F/SystemServer(31979):  at com.android.server.ServerThread.initAndLoop(SystemServer.java:1022)
F/SystemServer(31979):  at com.android.server.SystemServer.main(SystemServer.java:1372)
F/SystemServer(31979):  at java.lang.reflect.Method.invokeNative(Native Method)
F/SystemServer(31979):  at java.lang.reflect.Method.invoke(Method.java:515)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
F/SystemServer(31979):  at dalvik.system.NativeStart.main(Native Method)

TODO: Revisit this in the future when Google updates AOSP for multiple
system contexts.

Change-Id: I74be7a7a3ba1ede55a8ccae7c86e7650b27f435e
StatusBarView: Ensure to not overload in/out animations

- Post animate call in main thread, thanks @David96
- Handle animation checking current view visibility

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Signed-off-by: David L.-W. <xD_e-mail@gmx.de>
ExpandHelper: Improve one finger expanding forced handling

Instead of force returning false if view is null, setup a boolean
to force it with custom views like hover. Cherry-picked from CM.

Also request disallow intercept on drag started.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
StatusBarView: Avoid unnecessary calls to mHandler.post()

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Signed-off-by: David L.-W. <xD_e-mail@gmx.de>
add some missing ES strings to weather tile

Change-Id: I744107621fa1c6b5ed7d5109e8e4344482483291
QuickSettings: Camera tile [1/2]

Change-Id: Id0beb3dd559536bb5571ddc87cb0bcb4945b1a77

Conflicts:
	packages/SystemUI/res/values/kang_strings.xml
	packages/SystemUI/res/values/slim_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
add flip animation to some new tiles

Change-Id: I1128a189cb6b2160c294932262fe3699a5ee40e3