[1/3] base: omniswitch as default recents

OmniSwitch provides broadcast events for showing
and hiding the overlay

We need to make sure that OmniSwitch service is really
running else we will get no recents at all. Also on startup
it will take some time until the OmnISwitch service
has been started.

OmniSwitch will send a service start and stop broadcast
that will guard the usage of OmnSwitch

Change-Id: I31c5ae8839603b6e92b1a4613c793a9427aad2e2

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

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Notification drawer: full swipe to switch detection (1/2)
Add an option to detect swipe to switch on full screen, not just the bottom bar

Change-Id: Ib02df40afd95705910955b69645eeb3c49047b18

Thanks to PAC-man = https://github.com/PAC-man/android_frameworks_base/commit/069f3034319f86e369828a45451510de7d1b4b4c

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

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
[1/2] Allow Mobile Indicator to be toggled off when connected to WiFi

Conflicts:
	packages/SystemUI/res/values/config.xml
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java

Change-Id: I26fdb9a8e5631dc0a91a3ede8ef83123b749a4ea
Revert "[1/2] Allow Mobile Indicator to be toggled off when connected to WiFi"

This reverts commit 320790619549600bbfdc7a7ca041938693a34001.

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

Change-Id: Ie953e7116bf12dc7d4d9a08a0840096006f62943
Fix Omniswitch for recents

Change-Id: I40eb67bcb68b24f9c1cb8805f882d91859dbe7aa
FW_Base [01/21] - Revert "HeadsUp: option to launch in floating window (1/2)"

This reverts commit 40e55da4b5869ee7faf05ac74fe4bec765b745f6.

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

Change-Id: Iec81ff385a482607a4ca0424d7274f597a523b82
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [03/21] - Revert "Apps: Add blacklist interface [1/2]"

This reverts commit e9a2378434efdba78ad66c7cf8a3cade044e6bde.

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

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

Change-Id: I2ea9539f61974bb1eaea6f3a041dfd2b39d6003c
Signed-off-by: STELIX <ssspinni@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
FW_Base [04/21] - Revert "Keep app when opening floating window from recents panel"

This reverts commit f6a49e9d4f18bae34175979521d25b659e20f933.

Change-Id: I541f6d4d2f3aacd4429cb141502c326991bc33e4
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [05/21] - Revert "Dismiss IME when floating window is dismissed"

This reverts commit a830f86da5bb84e785406bbec09895d59bbcb928.

Change-Id: Ia5d446cf73ae87c7988d850aaf16ae72e79124e4
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [06/21] - Revert "Kill floating activities running in the same thread when tapping outside"

This reverts commit d926ed3c8824ddd6c3736a38fd5ffc9ad8c92c94.

Change-Id: I8871c864f78d090862533e18be4e097f657b8020
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [07/21] - Revert "Fix for launch app in floating mode from recents"

This reverts commit ec5738034a5b4828e23778c32eda3326cd0974f6.

Change-Id: I189036c1788267fc5bdede92c735dada5f577efc
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [08/21] - Revert "Recents: Launch as Floating App"

This reverts commit 198a28bc38e3daa4bf638aee282b7d978a25661e.

Change-Id: I72b21d7daf6926590525f5295291418799e92f37
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [09/21] - Revert "Launch floating notifications from notification panel (long click)"

This reverts commit f80419ac21e632b3dd1843d7d6d289621ef10dd9.

Conflicts:
	core/java/android/util/SettingConfirmationHelper.java
	core/res/res/values/cr_symbols.xml
	packages/SystemUI/res/menu/notification_popup_menu.xml

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

Change-Id: If282d10da2f65b01dfb426ea911300e6d214e21a
Signed-off-by: STELIX <ssspinni@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
FW_Base [10/21] - Revert "Floating Window: Welcome back"

This reverts commit a53bb0658ca96e30e67b5953c331510c41c9e987.

Change-Id: I50e34519b4961608f6bdbc2ec8f50dba036084f4
Signed-off-by: STELIX <ssspinni@gmail.com>
FW_Base [11/21] - SystemUI: Fix missing top task in recent panel

If preloadRecentTasksList was not called or was called too
late and RecentsActivty already started and last top activity has
excludeFromRecents flag setted it might be missing
from recent application list.

atken from cm11

Change-Id: Idc9e98cf0253e513f45b39068b73e259759a34f8
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
FW_Base [12/21] - 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
PS.21 : rebased due to changes in 4.4.3_r1.1
PS.26 : rebased

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/app/IActivityManager.java
	core/java/android/view/IWindowManager.aidl
	core/java/com/android/internal/app/ActionBarImpl.java
	core/res/res/values/custom_strings.xml
	services/java/com/android/server/am/ActivityStack.java

Change-Id: I706b64c91d956bbc31794b7e78365bb64988497f
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
FW_Base [13/21] - Revert "Revert "Launch floating notifications from notification panel (long click)""

This reverts commit fdf4b051188eca2c352f815918767c78849937e8.

Conflicts:
	core/res/res/values/cr_symbols.xml

Change-Id: I188ac91e8422427d61447b9a135355ea91a93477
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
FW_Base [14/21] - Revert "Revert "Recents: Launch as Floating App""

This reverts commit 0fba2136e1ed1daaeefe0a05816051048e886637.

Change-Id: I85fb6e5c9b8b153f61a88631ede6213d1425933b
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
FW_Base [15/21] - Revert "Revert "Fix for launch app in floating mode from recents""

This reverts commit b8687dd341cb5a598d5b60c407ee4cd3df9f5677.

Change-Id: Iaf68b7eb79d022d02f550c3bf1a29a07b16a0ecd
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
FW_Base [16/21] - Revert "Revert "Kill floating activities running in the same thread when tapping outside""

This reverts commit c3c9724166e1ce2a23681c03cb11ca01d36bc454.

Change-Id: I990e711954ea3b74e7d83eda944bd4bde5a8c4be
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>