Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b50ad68 authored by Jorge Gil's avatar Jorge Gil
Browse files

Adjust TaskFragment#getVisibility calculations

To account for the case of "empty" or "see-through" containers (such as
root freeform tasks with no children or other freeform children), which
were previously returning
TASK_FRAGMENT_VISIBILITY_VISIBLE_BEHIND_TRANSLUCENT and resulted in a
fullscreen sibling behind a root freeform task becoming paused, this
change introduces a couple of WindowContainer concept to help
distinguish these cases:

1) WC#fillsParentBounds: the container fills its parent by bounds or
   policy (i.e. W_M_FULLSCREEN)
2) WC#hasFillingContent: the container has content that fills it, which
   could be translucent or opaque

A freeform root with a non-fullscreen child fillsParentBounds but does
not hasFillingContent, for example, and TF#getVisibility now returns
TASK_FRAGMENT_VISIBILITY_VISIBLE as a result, which allows a sibling
below it to remain resumed.

Flag: com.android.window.flags.enable_see_through_task_fragments
Bug: 407602007
Test: atest ActivityLifecycleFreeformTests
Change-Id: Id3553084a4d8ac8494f61109aba41d896831bc50
parent fbd99f24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment