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

Commit 0cb7b8ef authored by Rachit Jain's avatar Rachit Jain Committed by jainrachit
Browse files

Override fillsParentBounds in ActivityRecord

- Regression from ag/32872149, since letterboxed activities may not fill the entire parent bounds, it would return false and therefore all sibling activities would still remain visible and paused.
- Override method in ActivityRecord since the activity will always fill parent bounds.

Bug: 413114394
Test: manual, open letterboxed activities and verify WM visibility states.
Flag: com.android.window.flags.enable_see_through_task_fragments
Change-Id: Iba4d9f7b2738907475bbbc0c463588e3d5bd3a8b
parent 4389fdac
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -7656,6 +7656,15 @@ final class ActivityRecord extends WindowToken {
        mResolveConfigHint.mTmpOverrideDisplayInfo = null;
    }

    /**
     * Return {@code true} always since the activity is always filling parent bounds. The override
     * is done because if the activity is letterboxed, the bounds may exclude the letterbox size.
     */
    @Override
    boolean fillsParentBounds() {
        return true;
    }

     /**
     * Returns whether activity bounds are letterboxed and are sandboxed to within the safe region
     * bounds.
+3 −2
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ public class TaskFragmentTest extends WindowTestsBase {

    @Test
    @EnableFlags(Flags.FLAG_ENABLE_SEE_THROUGH_TASK_FRAGMENTS)
    public void testVisibility_behindAtLeastOneNonFillingAdjacentTaskFragments_visible() {
    public void testVisibility_behindAtLeastOneNonFillingAdjacentTaskFragments_invisible() {
        // A fullscreen task with an opaque activity.
        final Task bottomTask = createTask(mDisplayContent.getDefaultTaskDisplayArea(),
                WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
@@ -464,7 +464,8 @@ public class TaskFragmentTest extends WindowTestsBase {
        topAdjacentTaskFragment2.setAdjacentTaskFragments(
                new TaskFragment.AdjacentSet(topAdjacentTaskFragment2, topAdjacentTaskFragment1));

        assertEquals(TASK_FRAGMENT_VISIBILITY_VISIBLE,
        // Bottom task should be invisible since an activity is always filling.
        assertEquals(TASK_FRAGMENT_VISIBILITY_INVISIBLE,
                bottomTask.getVisibility(null /* starting */));
    }