Special "app bubble" that is ordered at the front of the list unless
something else was selected. This is guarded behind the flag to
enable floating tasks, and a new flag to allow floating tasks to be
bubbles.
Test: manual - enable the flags and create a floating task
=> floating task appears in a bubble
Bug: 237678727
Change-Id: Ibf66e8bae07800b5f64598c9b50de7a7995d09e6
Add back flags to allow start background activities since besides
drag-and-drop, start a shortcut into split also need these permission.
Fix: 243101552
Test: atest StageCoordinatorTests
Test: long press on a shortcut to enter split
Change-Id: I9159734836183c811642dffe1a9faebb2ccc23a5
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
In core, windowing mode is being set in TDA with ag/19902621. Thus, set
windowing mode with RooTaskDisplayAreaOrganizer instead of
RootDisplayAreaOrganizer.
Bug: b/241168290
Test: services/tests/wmtests
Change-Id: Ib7e6701839f83ab4125a9630d20203f8c5e415ba
We were tracking active freeform tasks in the RecentTasksController.
This causes some issues when we want to share that information to other
controllers like DesktopModeController.
Move tracking of active tasks to a separate repository that controllers
can query and listen for updates.
Bug: 244348395
Test: atest DesktopModeTaskRepositoryTest RecentTasksControllerTest
Change-Id: I7a460020f6b2133225e292a04f29ae1dd27e964b
WHen using shell-transitions, use a transition instead of
regular applyTransaction
Bug: 236047261
Test: use desktop-mode switch w/ shell-transit. observe an actual
transition.
Change-Id: I81f37d278420383f8b2b0f37cca8a398313705cb
Same as the legacy app transition, we want to play the app customized
animation if there is no AE split.
We don't support app customized animation when there is AE split yet to
make the animation consistant.
Bug: 207070762
Test: atest WMShellUnitTests:ActivityEmbeddingControllerTests
Test: atest WmTests:TransitionTests
Change-Id: I68348cd650b9dbc8c39ef8d22a171d128e196882
Same as the legacy app transition, we want to play AE animation if all
changes are in Task with embedded activity
Bug: 207070762
Test: atest WmTests:TransitionTests
Change-Id: I66c5c083a517b3254d647c7335264eba8837f0cd
After I1a0c4d17, the expanding task will first be resized to fullscreen
then reparent to TDA after the divider bar fling animation finished. If
the expanding app is expanding to two pane mode, the resuming of the
second activity might be skpped due to the task in another side of the
split is already empty and invisible.
Update the drag-to-dismiss flow to reorder the expanding task on the top
of dismissing task. So the content in the dismissing side won't flicker
during the dismissing transition and the activity resume won't be
skipped in the expanding side.
Fix: 243368173
Test: atest WMShellFlickerTests
Test: atest WMShellUnitTests
Test: put Settings and Chrome in split screen,
drag divider bar to dismiss Chrome,
verified the expanding transition won't timeout
Change-Id: Id16c1d9b4849d5f600de9524ffebb91aba73a721
Make sure pip screen size animates to normal
or maximum size depending on the current width
when a double tap occurs
Test: manually reproduced steps in the bug listed
Test: atest WMShellUnitTests:PipDoubleTapHelperTest
Test: atest WMShellFlickerTests:ExpandPipOnDoubleClickTest
Bug: 232173973
Change-Id: Ia8ec8696fddd236f992803451f44457e974069ac
The DisplayLayout#stableInsets was set according to navigation bar
height and not get updated when TaskBar becomes visible.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dPuTSbBuAgjfyKiliwzo2Q
Bug: 198644965
Test: Open another app with PiP present and move it around, see Video
Test: atest WMShellUnitTests:PipControllerTest
Change-Id: I4db1446de0cb257e26d34985d294908cfe692967
Currently, the SplitscreenEventLogger is declared as private final and
initialized in constructor of the SplitScreenController and not used
anywhere else in the SplitScreenController. Moved the initialization to
the StageCoordinator and removed the field from SplitScreenController.
Bug: 245650570
Test: atest SplitTransitionTests
Test: atest SplitScreenControllerTests
Test: atest StageCoordinatorTests
Change-Id: Iedc8893982f3bc4ba4c41f6a394f5fdf39098a99
Merged-In: Iedc8893982f3bc4ba4c41f6a394f5fdf39098a99
Add unit tests for creating GroupedRecentTaskInfo objects and the
parcelling logic.
Bug: 244348395
Test: atest GroupedRecentTaskInfoTest
Change-Id: I10c97e91f164a45c3ed17935a820c5ed168e8305
Track active freeform tasks and filter them from recent tasks in overview if
desktop mode is active.
A task is considered an active freeform task if it meets the following criteria:
- task is running
- task has been visible at least once when desktop mode was on
Bug: 244348395
Test: atest RecentTasksControllerTest
Change-Id: I10854b467615fc5bb257c1719d3887643d28fd52
When we switch between desktop and focused modes, we clear bounds and
reset windowing mode for all tasks.
Make sure this affects only tasks that have activity type set to
ACTIVITY_TYPE_STANDARD. This ensures we don't clear bounds or reset
windowing mode for launcher or split screen stages etc.
Bug: 244348395
Test: atest ShellTaskOrganizerTests
Change-Id: Iaf84cb2733a6ffa93c267cb8c716e7c0eb7ca13f
PiP window will gravitate towards bottom of the screen if it's in the bottom half of it.
PiP window will gravitate towards left/right edge of screen, whichever is closer.
PiP window will avoid occluding any reported keep clear areas.
Test: manually, existing tests pass
Bug: 183746978
Change-Id: Idb481fee7ead67734c5de0d833b281ca2a2aaaa8
Therefore caption can be put at the same layer as other window
decorations. It adds CaptionContainerSurface to host the caption so that
WindowDecoration can put the caption at the same position as the task
surface.
Bug: 241598994
Test: atest WindowDecorationTests
Test: Caption is shown in front of embedded activities.
Change-Id: I9ec571859680f622449f4c3b5cea27222ec4c788
Improve enter split transition by two part changes.
1. Enter split with resizing animation:
We directly show split but no animation before, it might looks
bad to user because UI change too many things in few frames.
2. Fix flicker cause by black screen when split active:
When we start intent on side stage task, the top split root task
will go to top and current top one task will be set as invisible
then cause black screen due to split root task is full screen.
Solve this by use new wct api setForceTranslucent to make split
root task as translucent when split inactive. We need to reset
it when split active otherwise it cause flicker when back to home.
Except above change, we also need to set side stage bounds to
area outside of screen otherwise it still cause flicker because it
will show a flash of shadow when launch intent on side stage.
This solution should be removed after shell transition fully
landing because in shell transition we could make those transitions
be done in one transition.
3. Fix b/243634747 caused by the previous CL. We should ensure split top
root is non-translucnet after split active by any flow.
4. Fix b/243735702 which occured on the previous CL. Because sync
transcation might apply after the animation, we could remove apply
when split active but only apply by the animator.
Fix: 223325631
Fix: 243634747
Fix: 243735702
Test: manual
Test: pass existing tests
Change-Id: Id8822aafe9eb0d6d5b0282cea256db622b9730d0
There are several transitions involving window decorations that are
handled by Launcher, but we still need to tie window decorations to the
lifecycle of such transitions to release window decorations at the right
time. Thus we move this part of logic into a new class.
Bug: 241975249
Test: atest FreeformTaskTransitionObserverTest
Change-Id: Iff14be6f1fcb0b8ee7f634d5d41567348fff5c06
animation controller
Copy most of code from RecentsAnimationController to back gesture
animation controller(BackNaviAnimationController), the infrastructure
can be reused for either back-to-home/back-to-task/back-to-activity
animations if needed. Since the infrasturcture of legacy recents
animation controller should be stable already, we don't need to
worry about issues like leak leashes/flickers/fixed rotation.
BackAnimationAdaptor is a temporary class to help migrate to shell
transition, the target is to replace it by RemoteTransition.
Next step: Migrate to shell transition, decouple animation info from
BackNavigationInfo.
Test: manually play back to home animation to verify no flicker/black
background/leak surface. Also test that there can play back to home
animation even when quick swipe.
Test: atest BackNavigationTest
Test: atest BackNavigationControllerTests BackAnimationControllerTest
Bug: 237642535
Change-Id: I436a3dcf5011c56c08d131b40168f19128cc8723
Make a copy of TaskFragmentAnimation* to ActivityEmbeddingAnimation*
to fit into Shell transition model.
Bug: 207070762
Test: atest WMShellUnitTests:ActivityEmbeddingControllerTests
Test: atest WMShellUnitTests:ActivityEmbeddingAnimationRunnerTests
Change-Id: I44118e1415f85bcd49fa77bff10c67094ec9cad5