FWBase - Floating window with Multitasking w AppCircleSideBar [1/3]

This commit is a squash of following commits:

----------------------------------------
    Revert "Keep app when opening floating window from recents panel"

    This reverts commit f6a49e9d4f18bae34175979521d25b659e20f933.
----------------------------------------
    Revert "Dismiss IME when floating window is dismissed"

    This reverts commit a830f86da5bb84e785406bbec09895d59bbcb928.
----------------------------------------
    Revert "FWBase - Kill floating activities running in the same thread
when tapping outside"

    This reverts commit d926ed3c8824ddd6c3736a38fd5ffc9ad8c92c94.
----------------------------------------
    Revert "FWBase - Fix for launch app in floating mode from recents"

    This reverts commit ec5738034a5b4828e23778c32eda3326cd0974f6.
----------------------------------------
    Revert "FWBase - Recents: Launch as Floating App"

    This reverts commit 198a28bc38e3daa4bf638aee282b7d978a25661e.
----------------------------------------
    Revert "FWBase - Floating Window: Welcome back"

    This reverts commit a53bb0658ca96e30e67b5953c331510c41c9e987.
----------------------------------------
    Revert "FWBase - Launch floating notifications from notification
panel (long click)"

    This reverts commit f80419ac21e632b3dd1843d7d6d289621ef10dd9.
----------------------------------------
https://gerrit.omnirom.org/#/c/6380/
    FWBase - 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
----------------------------------------
https://gerrit.omnirom.org/#/c/6653/
    FWBase - Add option to open notification in floating window

    Depends On: https://gerrit.omnirom.org/#/c/6380/
----------------------------------------

    Add option to open a recent app in floating window

----------------------------------------

    FWBase - Floating window with multitasking - Small Fixes

----------------------------------------

Change-Id: I5dd73e25d3aaf7f41e01aeaaa44386934c015946
Signed-off-by: MURA Stefano [STELIX PippoX3] <ssspinni@gmail.com>
FWBase: MultiWindow - Extend SwipeHelper

I was not happy with long press on notifications and recents
to open apps in floating mode. The long press duration kinda
breaks the UI interaction flow, which prevented me from
actually using floating windows. Therefore, I've created a
private modification, which enables floating mode for
notifications and recents by swiping to the left. This
greatly improves usability without strongly deviating from
stock UI experience, in strict accordance with PA's
philosophy.  Changes are surgically implemented to keep the
probability of merge conflicts rather low. The code was
successfully tested on mako, hammerhead, tilapia, and manta.
Let the team discuss and decide whether or not this is a
worthy extension to PA.
Changes are split into two commits (PT1 & PT2).
PT1:
- Extending SwipeHelper:
SwipeHelper can now distinguish between directions LEFT,
RIGHT, UP, DOWN and can fire an abstract trigger 'event'. A
trigger direction can be specified and when a swipe in this
direction occurs dismissable children will not be dismissed,
instead they will be snapped back.  Whenever a child is
swiped far or fast enough in that direction an event is
triggered and the onChildTriggerd() callback is issued. This
callback was added to the SwipeHelper.Callback interface and
therefore requires all its implementations to realize this
method, such as probably Hover, which is sadly not open
source (yet?).
PS7: Added Hover support

Change-Id: I6bc11feea9b517e75c64fa77b3fe633e278658a1
Merge commit 'refs/changes/89/889/3' of https://review.carbonrom.org/CarbonDev/android_frameworks_base into kk

Conflicts:
	core/java/android/view/IWindowManager.aidl
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java