Halo: Add master switch to disable Halo (1/2)

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Fix build
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Reworked transparent layer
When a halo'ed window is opened, the transparent layer will be always visible. It will manage the background dim.
This fixes some apps dimming its sandboxed processes (like chrome).

LayerActivity manages its own lifecycle. When it's focused after paused it finishes itself.

System processes (identified by "android" pkg in SystemUI and system uid in Activity) don't use the layer and still use their own background. This
has been kept this way to not interfere with their activity.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
LayerActivity: Corrected lifecycle
Should contemplate the case that the activity gets stopped
Fix little derp causing visual bug

To reproduce, disable halo, and press "clear all notifications" button

Change-Id: Ice7ab62229e27db53ef51fd5df55dbcd0a86358b
Revert "Fix Floating Window"

This reverts commit 6d949ea8be51b16994d1ca911cca487203284286.
Revert "Floating window (1/2)"

This reverts commit 639d99f8c43cdb0dccff04032ba4e257bd91cdb0.
Update drawables from PA
Signed-off-by: Paul Beeler <sparksco@gmail.com>
HALO cleanup

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Don't bring home to the front if we're opening a floating activity
HALO: Option to pause the underlying app (1/2)

- adds an option to pause the active app when using HALO
- this is enabled by default for devices with low memory
- (currently: <640MB RAM available to the kernel)

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix Halo not showed at first notifiction drop
Give floating flag to previous activities in the stack
When launching stacked activities, only the last one is flagged as floating in sysui when tapping halo.
This causes the system to show the launcher when the first stacked activity is launched (this first intent gets the flag FLAG_ACTIVITY_TASK_ON_HOME
in TaskStackBuilder).
This change makes all the stacked activities get the floating flag if the last one has it.
Halo: unregister settings obeservers

Change-Id: I57ec9b874c332bec8be2b3e3ed2505f6be53b79e
Revert removing FLAG_ACTIVITY_CLEAR_TOP from intent
Removing that flag from the intent provokes some apps not being able to finish pressing the back key.
This change doesn't affect other opened apps.

Change-Id: I81a47f8e648114d8e2144a3b9854ede299d67871
HALO: halo can save last position now

Change-Id: I5a608b02323ab9fdfa3922a3c9844e75c3a1ab09

fix

Change-Id: I00ced429cfcc90507b8cc14b228a74b8902e67e8
Show as floating window on recent apps

This also removes "hybrid properties" from recents menu, it is fairly unneeded
now. This is a test, It's probable that it will be removed later

Signed-off-by: Paul Beeler <sparksco@gmail.com>