diff options
| author | 2025-03-08 04:48:04 +0000 | |
|---|---|---|
| committer | 2025-03-14 04:27:52 +0000 | |
| commit | eb84c309b08db166da26aabae994dda362565867 (patch) | |
| tree | 0fc86a28b9219be7d383f970cd08f5ff7a0d8818 /libs/androidfw/ObbFile.cpp | |
| parent | c6af79cff3599a387961cdc98e2c8c152ce3ba21 (diff) | |
Let nested multi-window inherit bounds from parent
I5985242014e02e051fad98e89a38cf03cd096f66 made a change to allow
non-root, organized tasks to use launch bounds calculated by
LaunchParams instead of always inheriting bounds from the root task.
This was to allow nested freeform tasks to use launch bounds instead of
always taking fullscreen bounds.
However, this also causes multi-window (split) leaves to use
root.getRequestedOverrideBounds() as their bounds. The root bounds are
often non-empty (like in 50/50 split), which causes Task#getVisibility
to stop considering an occluding split leaf as occluding because
matchesParentBounds() relies on the bounds being empty.
To fix this, this change adjusts the bounds calculation to inherit (use
null) bounds from the parent when we're disallowing independent bounds
from parent (i.e., not freeform).
It also refactors the logic in this method to be more readable and
intentional. In particular, |allowIndependentBoundsFromParent|
determines whether or not to inherit in nested cases, even if the only
allowed scenario are nested freeform tasks right now.
Also puts this and the prior changes from
I5985242014e02e051fad98e89a38cf03cd096f66 under a new flag.
Flag: com.android.window.flags.nested_tasks_with_independent_bounds
Bug: 402825303
Bug: 394189679
Test: atest RootTaskTests#testGetVisibility_MultiLevel
Test: atest
MultiWindowTests#testVisibilityWithTranslucentAndTopFinishingActivity
Test: atest
ActivityLifecycleTopResumedStateTests#testTopPositionSwitchOnTap
Test: atest ActivityLifecycleLegacySplitScreenTests
Change-Id: I32e82b6f975bf4c77f8991b02df8999db63c634a
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions