PipTouchHandler, similar to other components in SysUI, should be in-sync
with the destination bounds calculated within SysUI rather than WM.
Fixed also the empty movement bounds upon the first call to
PipTouchHandler#onMovementBoundsChanged. Together, this change should
fix the PIP not being lifted on IME show up. PipTouchHandlerTest is
updated correspondingly.
Bug: 153352899
Test: manually enter/exit PiP
Test: atest PipTouchHandlerTest
Change-Id: I2912af2a181b7fb57c6d90751744d46c6b3366d2
In quick switch flows, launcher will first swipe task snapshot
through recents animation, and then start new task with custom animation
options through startActivityFromRecents after gesture finish detected,
and then finish recents animation finally.
But that way user may experience flickering before the new task launch
and recents animation finish.
To improve quick switch flickering, we ignore the new task's custom
animation from recents and generate task remote animation target,
and then trigger a callback for launcher to control/animate this
task surface, more like a part of RecentsAnimation,
Also, adding removeTask method for launcher can flexibility remove the
new task animation target once no need to animate, so that launcher
can decide when to finish recents animation.
Bug: 152480470
Test: manual as below steps:
1) Doing quick switch task.
2) Make sure launcher can receive onTaskAppeared callback.
3) Make sure launcher calls removeTask successfully.
4) Make sure launcher can finish recents animation after 3).
Change-Id: I0692a280a49719229fa8871509bad37a1343a00f
We allow quickswitching apps in different
orientations by touchiing in the same region on
the device. To avoid conflicting touches between
the swipe gesture and the back gesture, we disable
the back if the rotation of the swipe location and
rotation of current device do not match.
Fixes: 150250451
Test: Tested quickswitch manually with
test apps fixed to different rotations.
Ensured back only showed when rotation of
touch and display matched.
Change-Id: If3b4d15eb4b66ce688b91d44a2ec16b3610ecf0a
On the other hand, since we won't be able to get the callback from
TaskOrganizer when an activity (used to be in PiP mode) is removed,
reset of the reentry bounds is kept in WM.
Bug: 152549281
Test: manually enter/exit PiP
Change-Id: I8b4b7f87c4a7601d8bdf32af8105a68450012a87
- Skip multi-window mode tasks with the exclude-from-recents flag from
the visible recent tasks list
- Expose a method in LauncherApps to be able to start a shortcut with
additional intent flags (to add the exclude-from-recents flag)
- Remove unused ActMan path (only ActTaskMan call is used now)
- Refactor the call to get the running tasks, there are currently only
two usages of getFilteredTasks(), one is to get all the tasks, the
other is really to get tasks that we will end up using for transitioning
into the task in recents.
As such, we can remove the individual ignore flags (it would get more
complicated if we wanted to filter based on logic like MW mode +
excluded recents only), and instead have a boolean that filters the
running tasks based on whether they would ever show in recents at all,
with the exception of the home and recent tasks.
Bug: 152133859
Test: atest WmTests:RunningTasksTest
Test: atest WmTests:RecentTasksTest
Change-Id: Ia4f5fd37228c72ce449490f948e923afba821bb2
Signed-off-by: Winson Chung <winsonc@google.com>
Also, modifies bubbles to update this value when bubbles are expanded or collapsed.
This will work in concert with the other CLs in this topic to collapse bubbles (but not the app behind it) when a swipe-to-home gesture occurs. It will not affect the behavior of the home button in three-button nav.
Test: atest SystemUITests
Bug: 146167884
Change-Id: I825afc7fa58c66e92a277bf94876c23917c412da
API Council provided the following feedback:
1. Rename addView() to setView()
2. Add getView()
Bug: 151311937
Test: Existing tests pass
Change-Id: I26665c8bb8d0c10c5eb4228feb4ff13ee89f0d7b
This adds a notion of per caller wallpaper zoom, in order to support
simultaneous clients.
The shade might be pulled down while in overview, for example, and we
must coordinate between launcher and systemui.
Bug: 149792636
Bug: 146387434
Test: atest NotificationShadeWindowViewTest
Test: atest WallpaperControllerTests
Test: manual
Change-Id: I588ba56d3d2704845d033ea2a5890ce812b9ee07
- SysUI can determine what to do based on the type of activity launched
(ie. expand PIP/Bubbles to fullscreen)
Bug: 148977481
Test: atest TaskStackChangedListenerTest
Test: Launch app in split primary, ensure launching app again triggers
recents
Test: Launch app in PIP, ensure launching app again triggers it to go
fullscreen
Test: Launch app in bubble, ensure launching app again triggers bubble
to expand
Change-Id: I754a71a72dd0e660930b19acbf9fe6ccbb453152
With Hierarchical animation, the animation layer will no longer
be a fixed fullscreen layer but animate on the parent container's surface.
In order to run a remote animation, the animation controller needs to
know bounds of the target relative to both its parent and the screen.
The CL includes:
1) RemoteAnimationTarget changes:
- Add localBounds field for indicating the target bounds which
the coodiates relatives to its parent.
- Add screenScreenBounds field to replace souceContainerBounds
to reflect the target bounds relatives to the screen.
- Mark position & sourceContainerBounds as deprecated.
2) Modified related places to set correct localBounds information.
Test: build / run, make sure installing the old version of launcher on
the this new platform change still compatible without crash.
Test: manual as follow steps:
- Launching app from launcher to split-screen secondary stack
- Swipe up to overview screen and drag TaskView to see if the TaskView
surface is shfted, expected is not.
Bug: 148780840
Change-Id: Id9dbf6de193ab73fe94bc24ef6a27edc93380a14
- Move the animator to be called on the update thread
- Move the calls on task org to update on that thread as well
- Cache the leash and token to ensure we don't make binder calls to fetch
the leash on each frame of the animation
- Don't align with SF vsync now that we're driving the surface animations
Bug: 150810666
Test: Enter PIP, move it around
Test: atest PipAnimationControllerTest
Change-Id: Id05980529681f892638f52f492262fde246cac20
WindowlessWindowManager is not visible as external APIs, so for
launcher / wallpaper to use the API the rendering code has to be in the
SysUI.
Bug: 150224413
Test: Manual. Make sure universal smartspace still works as intended.
Change-Id: If006d622f181f6c8cc7c1cebda3f63b0b2ad85d5
- Copy surface params builder to compat class
- Add calls to set background blur
- Make recents/app transition leashes effect layers so blur can be set
on them
Bug: 149792636
Test: Build with launcher with blurs enabled
Change-Id: I4cebcab090719c6a17f197a3cd4450d68e55b424
The bounds animation is cleaned up within window manager and it's now
the SysUI component listening on callbacks from TaskOrganizer for
entering to and exiting from PiP mode.
Additionally, the expand and move of the PiP window is now part of SysUI
as well.
Known issues:
- Black background when in transition from PiP to fullscreen. The
wallpaper gets into hidden state too early
- App gets into PiP mode too early when entering PiP, need to defer the
configuration change sent to app in this case
Bug: 146594635
Bug: 148198539
Bug: 138144750
Bug: 149569903
Test: atest PinnedStackTests
Test: atest PipAnimationControllerTest
Test: atest RecentsAnimationTest
Test: atest RecentTasksTest
Test: atest com.android.server.wm.ActivityStarterTests
Merged-In: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
Change-Id: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
Store the original task snapshot size instead of the scale from which
the bitmap was saved. This simplifies the logic around restoring and
saving from the proto, as both the reduced scale and full scale
snapshots make use and share the same state.
Also remove scale from TaskSnapshot, and remove and reducedScale from
TaskSnapshot.Builder.
Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148491788
Bug: 148617404
Bug: 142063079
Change-Id: I1dccaba87c3d8b95bf4156f41f9fd5d40019f675
Rename:
config_fullTaskSnapshotScale -> config_highResTaskSnapshotScale
config_reducedTaskSnapshotScale -> config_lowResTaskSnapshotScale
Both full and reduced scale can be "reduced" from 100%, so name them
more clearly.
Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148617404
Bug: 142063079
Change-Id: Ie8073d5a3048c19450308b2af22d363deaa51b6a
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I7133e151a1037c42b275b97857936437a7a6725f
These won't work with the BLAST adapter since the Surface isn't
known to the server side. We just convert them in to the other
variant of defer transaction calls.
Bug: 146598493
Bug: 149251083
Test: Existing tests pass
Change-Id: I34fc4bb90114bae8b0d9ffdee5c91a2371e5c240
Revert "Update CTS tests for tile-based split-screen"
Revert submission 9964969-sysui_split_screen
Reason for revert:
- Random SysUI crash (ag/10335781)
- Breaks IME tests with new_insets set to 2
- Crashes SysUI in split screen with new_insets set to 2.
Reverted Changes:
I103f68030: SystemUI Split via TaskOrganizer
If6740b7ee: Connect split-screen things to systemui divider
I44f497e7d: Update CTS tests for tile-based split-screen
Change-Id: Ife6878044ff19905ed97b599d8c67f80cb8e399e
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I103f68030a170e2fd3d8f2125b81cf33af412793
Prior to this change, if a plugin was active, we reported a
CrashWhilePluginActiveException even if that plugin was whitelisted.
Now we only report the exception if we actually disabled an exception.
Bug: 149109460
Test: atest SystemUITests
Change-Id: Ibf26d587a09a859f79bfda5ee083d4af93236f55