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

Commit 9ae9bad4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Override fillsParentBounds in ActivityRecord" into main

parents 5c5056c3 0cb7b8ef
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 */));
    }