* Compute and save a StagedSplitBounds object for every
pair to determine it's position, size, divider, etc.
* Moved GroupTask to Launcher
* Moved StagedSplitBounds from launcher to wm/shell
because sharing is caring.
Bug: 203006080
Change-Id: I8513e027f8c9606fbed1283013eafea2cf905f3f
- Add pairs for the top visible children when both roots are populated,
and update when either side changes.
- Remove pairs if an activity is finished, or if the user dismisses
split manually
- Remove pairs for associated tasks if they are made visible in fullscreen
Bug: 202740477
Test: atest WMShellUnitTests
Test: adb shell dumpsys activity service SystemUIService WMShell
Change-Id: I87c632dfd1a014d64ad8e25c9e68ea6ca230744e
On display changes, it is possible that the old bounds is now too big
or too small for the new display. This is especially like on foldables,
such as a min size on a folded state is too big when in an unfolded
state.
Bug: 198679951
Test: Fold, minimal size, then unfold - see size change, and resizing
now doesn't jump to from too small -> small
Change-Id: I5de64860f1fbb476ff1a6a8dd9a0c50fd3259a45
- These map to logging states, but can be used to distinguish
cases to retain/remove the splits in recents
Bug: 202740477
Test: atest WMShellUnitTests
Test: adb shell dumpsys activity service SystemUIService WMShell
Change-Id: Ie028f6a2cb63beda97482e86e2c60dbf8f81e625
- Certain system ui implementations which use the shell don't depend on
SystemUI-core, which means that the dagger modules for providing the
core Shell components need to be copied (which makes it more cumbersome
to make changes). Instead, move these modules back into the shell lib
for any SysUI app to reference.
Bug: 205019015
Test: make SystemUIGoogle
Test: make CarSystemUI
Test: make ArcSystemUI
Change-Id: I8dc938a7695972f9d7b3d7ea8e3ce65a7b454b13
Add a new "enter split" button that allows user to go directly into
split screen on large screen devices from PiP.
- Add button
- Calculate split-screen location based on current PiP bounds
- Merge all WCT into one after animating
Video: http://recall/-/gu5DjQFZPMFpwgaXdl4cV3/gnNkSpC72tlTGP2mrKR07R
Bug: 202740657
Test: Enter PIP, open another app, tap "enter split"
Change-Id: I0829c910b2873ed4c4b0ea4fe0ca28b7f87736d8
- Add a shell component and interface for Launcher to use to get recent
tasks including paired splits (pending integration w/ split controller)
Bug: 202740477
Test: atest WMShellUnitTests:com.android.wm.shell.recents.RecentTasksControllerTest
Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: I34d834061ed2391d89cf56d6a2fd262868707674
Merged-In: I34d834061ed2391d89cf56d6a2fd262868707674
Add log when split exit for debugging some auto dismissing bug
which hard to repro locally.
Also add a check when exit split for avoiding exit run many times.
Bug: 204527184
Test: pass existing tests
Change-Id: Iaf98a7eb54a2988d13b3b8ca871c750f993fa8b4
- Pull code that manages the lifecycle of the callback into its own
class which takes care of cleaning up any callback references and also
listening for when the binder dies
- Removing some boilerplate code
Bug: 202740477
Test: atest WMShellUnitTests
Change-Id: I7ff4c876fc14291d6523c2c62a7c453a01d96294
The width of the hint is constant but the height changes with respect to the number of lines the text requires (see screenshots below). The X position of the hint is set programmatically so that the point's center will be aligned with the button's center.
Still need to add UI for different states of the button (pressed, focused, etc.) and maybe also the hint (since it's clickable). Mocks for this are still TBD.
Mocks: https://www.figma.com/file/fLAVOdDkg0lnFWiltSYbGA/Multitasking?node-id=2719%3A54196
Screenshots:
[default - 2 lines] http://screen/4EtytFiKsY3Q5NE
[LTR language] http://screen/9BSPipZYUd7UGPV
[short text - 1 line] http://screen/AN5bds6rh5V55Bw
[large font - 3 lines] http://screen/6utG596y52LBDjX
[long text - 4 lines] http://screen/7mBL2fXWy43UsTq
Bug: 198347324
Test: atest WMShellUnitTests:SizeCompatRestartButtonTest
Test: atest WMShellUnitTests:SizeCompatHintPopupTest
Test: atest atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Ida4c4171be94b60499cfe8acb6a2278f7e10a1f3
Clear overrided windowing mode and window bounds when a task vanished
from freeform task organizer to make sure the task can inherit config
from its new parent.
Fix: 204842882
Test: put a task in freeform, then trigger split screen with such task,
observed it applied multi-window windowing mode and bounds
properly.
Change-Id: Ifb100d17a83931237e58bcd774dce304a3fdb731
This basically ties applicationthread binder token to remote
transitions. Shell is first boosted (to run the shell transition
logic) and if it then delegates to a remotetransition, it will
then request that process also be boosted.
Bug: 183993977
Test: add logging in WPC.setRunningRemoteAnimation and verify calls
during transitions
Change-Id: I94babc327e935ea81271942287a83b948dd11f8b
Make moveToSideStage doing reparent oeprations only and leave all the
other active operations to onStageHasChildren. Also make sure it evicts
original children.
Remove setLaunchRoot and setWindowingMode operations in MainStage since
it won't be set as launch root and won't change in between of fullscreen
and multi-window windowing mode anymore.
Fix: 204519739
Bug: 202740040
Test: atest WMShellUnitTests
Change-Id: I6199862502646056966412824a5be840a15e8726
FullscreenUnfoldController#resetSurface happens in between
RecentsAnimationController cleanup and PipTaskOrganizer#onTaskAppeared
may cause flicker at the end of auto-enter-pip transition.
Fix it by intentionally ignore resetSurface if the task's pinned.
Bug: 203724707
Bug: 204284060
Test: repeatedly swipe to enter PiP from YT on foldables
Change-Id: Ie074e8a506d2526fc081ff4d089a2acb00549286
When split active by drag drop, the active point is
onStageHasChildrenChanged callback but we don't reorder side stage
to top then make it cannot be focused.
Add reorder root to top for fixing.
Fix: 204510713
Test: manual
Test: pass existing tests
Change-Id: I553a57250c302ff435a35c9a10599fc375e48248
On large rounded corner devices, Rounded corners around divider
cannot display right corner path because it need more space to
draw corners and divider bounds is fixed.
Fix this by enlarging the divider window bounds. However, if we only
enlarge it, it will cause divider touch region too big to make app
hard to interactive. Therefore, migrate touch region setting logic
in legacy split to here, only set divider handle view size as touch
region.
Fix: 202808282
Test: flash on barbet and active split screen to check
Test: pass existing tests
Change-Id: If292c0d4c598d75672ec821d1fee45a8892b236f
Remove the support of drawing side stage outline and update
OutlineManager to SplitDecorManager to help rendering decor view for
split screen like providing resizing hint.
Fix: 202740435
Fix: 202174975
Bug: 201653912
Bug: 200850654
Test: atest WMShellUnitTests
Test: manual check split resizing behavior
Merged-In: I4033255d8e2a94f69667ca1365b17da956816cde
Change-Id: I4033255d8e2a94f69667ca1365b17da956816cde
We assume dismissing side should be DOCKED_INVALID when split
active, however, if snap algorithm only have one target, it will
get other side due to current algorithm.
Fix this by correct algorithm and ensure dismissing side be
DOCKED_INVALID when split active or layout.
Fix: 203745267
Test: manual
Test: pass existing tests
Change-Id: I077a93472dad89bc620e490dcae5170e9a56279b
If an animator is already running, we usually just update its end
bounds - but we also end up over-writing the original callbacks. This
used to work well since pre-shell transition, callbacks are always
pulled from PipTaskOrganizer, but now we can have two places that supply
callbacks (PipTransition). So let's just leave the callback alone.
Another potential issue is that sometimes finish callbacks from one
transition is not called before starting another one, and starting a new
transition overwrites the old finishCallback. We will then finish the
earlier callbacks to ensure the transition system does not hang the
entire device, but throw an Exception to not gloss over the potential
issue.
Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ib4c5926beec5745d8a0abccec5c67849488e532b
There will receive another onAnimationStart/onAnimationEnd callback
when calling ValueAnimator#end if the animation is not running, which
is not necessary if the animation was finished already.
Bug: 195736656
Test: atest SplashscreenTests
Change-Id: Ifbbf2f799e3e69624626b16e08f40b562fe483a8
Add jank instrument support for splash screen avd and exit animation.
Bug: 195736656
Test: see trace in comment
Change-Id: I1fdb9e14145bcf519eea99e440de74238e3c765c
Sometimes when dropping app icon to enter split screen, it'll exit split
screen immediatlly because it evicts newly launched task before the task
considered to be visible. Update to collect child tasks to evict before
launching activity.
Fix: 203610931
Fix: 203636251
Test: atest WMShellUnitTests
Change-Id: If070fb5b3eb0b3fc178122d38b2dce3072621449