Handle relaunching pausing desktop tasks
- Detect when we are relauching a task within a desk root and readjust their surface position which is already relative to their parent, otherwise we would apply an extra offset. - When a desk root (or one of its child tasks) is relaunched from recents, only the selected tile (in exploded view) and the root will appear as "opening" in the merged transition because the other tasks in the root are not changing visibility or order and thus are not participating in the transition for the launch of the other sibling. In such cases, the opening task (and root) would've been saved in |mPausingTasks| and will be moved to |mOpeningTasks| while also falling into the |onlyOpeningPausedTasks| case. This means this is considered a |returningToApp| case and the only additional work left to do is to reorder the "opening" tasks to top (i.e. the desk root and selected task) after reordering the "pausing" tasks to top (i.e. the siblings). Note that this is especially important even though the desk and its selected task were already moved to front because "pausing" tasks may contain siblings that we don't want to move back on top of the selected task and may also contain the DesktopWallpaperActivity task, which should not be on top of the root or any child. Also notable that falling into |returningToApp| (a desk in this case) is intentional, as this ensures DesktopTasksController's handling of #handleFinishRecents keeps the desk in an active state. - Also applies rounded corners to these opening freeform tasks. Bug: 420744057 Bug: 413378320 Flag: com.android.window.flags.enable_multiple_desktops_backend Test: manual - with exploded view enabled swipe of from a desk with 2+ tasks and select them individually - verify exit overview and reentry into desk is WAI. Test: manual - from a desk, swipe up to home and verify deactivation is WAI Test: atest RecentsTransitionHandlerTest Change-Id: I0f6ae35ef1c3fcf5be7627cc05604d9055652699
Loading
Please register or sign in to comment