[1/n] Enforce Shell desktop cascading in Launch Params
Desktop taskbar and app drawer launches now start in shell, meaning
after the intent is created and started, shell does not have another
opportunity to impact the launch. This means the initial bounds of the
task can potentially be wrong as Shell does not have enough information
about the activity to resolve its correct initial bounds.
Core has the ability in the `DesktopLaunchParamsModifier`, to calculate
the correct initial bounds for an activity but does not have the ability
to calculate the correct cascading position for the Task (as cascading
is done in Shell).
This change introduces a way for Shell to pass the cascading position to
Core (via the `ActivityOptions`) and have it respected in the Launch
Params calculations. The cascading position will be passed to Core via
the `ActivityOptions#launchBounds` which will be set to the default
desktop bounds size (as a place holder) and cascaded to the correct
location. Traditionally the activity options bounds are respected,
however setting the newly introduced `flexibleLaunchSize` boolean in the
activity options will signal Core that the
`ActivityOptions#launchBounds` size can be updated. In the
`DesktopLaunchParamsModifier` the initial size of the activity will be
calculated and cascaded according to the extracted position from the
`ActivityOptions#launchBounds`, forming the final initial launch bounds.
Flag: com.android.window.flags.enable_shell_initial_bounds_regression_bug_fix
Fixes: 396075922
Test: atest WMShellUnitTests:DesktopTasksControllerTest,
atest WmTests:DesktopModeLaunchParamsModifierTests
Change-Id: Ib0099b0f20d5e1f16bbe651cf390568026dc5f8d
5 files changed