Base: Floating window with multitasking

basic floating window are taken from AOSPA (HALO) by @D4rKn3sSyS

Drawables courtesy of @Alex Cruz thanks to him :)

with heavy change to get this work for multitasking

this feature, has ability to:
1. Moveable window to various position
2. Scaling window with 2 finger like zoom in/out
3. Double tap in actionbar or above window to fullscreen or back to floating window
4. Automatically resize when Snapping into one of side (Top, Bottom, Left, Right)
   (taken from xhalofloatingwindow by @zst123)
5. Automatically switch focus from other app (taken from multiwindow by @xplodwild)
6. Unlimited floating window app (depends on RAM)

this is still under testing, to make fully works
so if there any bug because of this, DO NOT REPORT INTO OMNIROM JIRA

to make app launch using Floating window feature

you must add Intent.FLAG_FLOATING_WINDOW
before start an activity

for example you can look at https://gerrit.omnirom.org/6515

need https://gerrit.omnirom.org/#/c/6561

PS.17 : fix scaling
PS.18 : fix layout calculation when rotate
PS.19 : support minimize/maximize window (see App circle sidebar)
PS.20 : fix previouse app

Change-Id: Iad00c239de7d66e8bb45205ce626d4f08417b7cd

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/app/IActivityManager.java
	core/java/android/content/Intent.java
	core/java/android/view/IWindowManager.aidl
	core/res/res/values/custom_strings.xml
	services/java/com/android/server/am/ActivityStack.java
	services/java/com/android/server/wm/WindowManagerService.java
Dismiss IME when floating window is dismissed

Previously the IME would be stuck on screen if the
floating window was dismissed while it was showing.

Original id from PA gerrit -> Change-Id: I8ca61b07ed89bae85eabd8db23f87b6f1f0b179f
Signed-off-by: Evan Anderson <evan@thelinuxman.us>

Change-Id: If38e65f61ba309d22306bf4b37c3c55630c006ed
Kill floating activities running in the same thread when tapping outside

This change makes all activities from the same app to be finished when we tap outside the halo window. Other apps running in different threads
(floating or not) won't be finished.

Port from here: https://github.com/ParanoidAndroid/android_frameworks_base/commit/f489f45ab2ba5dd4991c241917f7f4b0fd74b884

Change-Id: Ie6d6f46b2e23be60f991520ed480c2866fb2d0e3
Launch floating notifications from notification panel (long click)

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

Change-Id: Icf2915cf71f07d19cf8179ee5e561891b0a78e77
Signed-off-by: anerikg <anerikgames@gmail.com>

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

Conflicts:
	packages/SystemUI/res/values-es/slim_strings.xml

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

Conflicts:
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/slim_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
SlimRecents: add floating window menu

Change-Id: I63894fb8551b881c45c991bc30353b3dc4f3e43c

Conflicts:
	packages/SystemUI/src/com/android/systemui/slimrecent/RecentPanelView.java
Base: App Circle sidebar (add support floating window)

PS.8 : rebased
PS.9 : add support minimize/maximize window

Change-Id: Ied388a0a4054dfaf1d3e6fcdc33dd5aab28565a9

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

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

Conflicts:
	packages/SystemUI/res/values/slim_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/appcirclesidebar/AppCircleSidebar.java
Recents: Launch as Floating App

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

AICP'fied. Strings already defined in res/values/strings_custom.xml

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

Conflicts:
	packages/SystemUI/res/menu/recent_popup_menu.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Conflicts:
	packages/SystemUI/res/menu/recent_popup_menu.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Fix for launch app in floating mode from recents

Change-Id: I216b02a60cd46b7fef49e04fe090169c4703bcb6

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Keep app when opening floating window from recents panel

Start activity asynchronously by appending it to system's
message queue to let RecentsPanelView cleanly execute
dismissAndGoBack before the floating window gets started.

Change-Id: Ie58ddc81b4ea897b4243404a58fae47583e49e1a

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
SwipeHelper: Ignore ACTION_OUTSIDE touches

  When using the swiper class within a layout like a notification container
  elsewhere the notification shade, when tapping outside even if the finger will
  not move is easy to detect an ACTION_MOVE event. That will consider it like a
  dragging event and the view swipes to left a bit on its own getting stuck
  until next touch. Break if tapping outside, so it doesn't go mistakely forward
  to ACTION_MOVE event case.

Change-Id: I07e5a3a95b8bbebeadcc97ba2d7d1cf787a37e61
Signed-off-by: BigBrother1984 <stevewatersy@gmail.com>
clean up this floating mess lol