Support for a floating task window (behind a sysui flag)

Creates a new package within shell for floating tasks along with a
basic controller and interfaces for sysui and launcher to use to
manage floating tasks.

A single floating task is allowed at a time and they can only be
created if a sysui flag is turned on.

The floating task is backed by a TaskView, floats above all other
content, and can be moved via a handle at the top of the view. The
view sticks along the left and right edges of the screen, can be
stashed (similar to PIP), and can be removed by dragging to a dismiss
target in the middle of the screen (similar to PIP & bubbles).

The tests included trigger the sysui flag on and off to ensure the
flag behavior (i.e. that you can't create one unless the flag is on).

Test: atest FloatingTaskControllerTest
Bug: 237678727
Change-Id: I490c44685825e14166869b2cf7c2994ee0e30ba7
This commit is contained in:
Mady Mellor
2022-08-16 12:11:15 -07:00
parent 5856ac8f1e
commit 38edb219c0
20 changed files with 2254 additions and 10 deletions

View File

@@ -96,7 +96,8 @@ public abstract class SystemUIInitializer {
.setStartingSurface(mWMComponent.getStartingSurface())
.setDisplayAreaHelper(mWMComponent.getDisplayAreaHelper())
.setRecentTasks(mWMComponent.getRecentTasks())
.setBackAnimation(mWMComponent.getBackAnimation());
.setBackAnimation(mWMComponent.getBackAnimation())
.setFloatingTasks(mWMComponent.getFloatingTasks());
// Only initialize when not starting from tests since this currently initializes some
// components that shouldn't be run in the test environment
@@ -115,7 +116,8 @@ public abstract class SystemUIInitializer {
.setDisplayAreaHelper(Optional.ofNullable(null))
.setStartingSurface(Optional.ofNullable(null))
.setRecentTasks(Optional.ofNullable(null))
.setBackAnimation(Optional.ofNullable(null));
.setBackAnimation(Optional.ofNullable(null))
.setFloatingTasks(Optional.ofNullable(null));
}
mSysUIComponent = builder.build();
if (initializeComponents) {