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

Commit 3f55687a authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Only set crop if TaskFragment does not fill its parent" into main

parents 0d89b0e7 0aafdf8d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2753,7 +2753,12 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        if (!forceUpdate && width == mLastSurfaceSize.x && height == mLastSurfaceSize.y) {
            return;
        }
        if (fillsParent()) {
            // Rely on parent's crop.
            t.setCrop(mSurfaceControl, null);
        } else {
            t.setWindowCrop(mSurfaceControl, width, height);
        }
        mLastSurfaceSize.set(width, height);
    }

+1 −1
Original line number Diff line number Diff line
@@ -132,8 +132,8 @@ public class TaskFragmentTest extends WindowTestsBase {
        final int parentSw = parentConfig.smallestScreenWidthDp;
        final Rect bounds = new Rect(parentBounds);
        bounds.inset(100, 100);
        mTaskFragment.setBounds(bounds);
        mTaskFragment.setWindowingMode(WINDOWING_MODE_MULTI_WINDOW);
        mTaskFragment.setBounds(bounds);
        // Calculate its own sw with smaller bounds in multi-window mode.
        assertNotEquals(parentSw, mTaskFragment.getConfiguration().smallestScreenWidthDp);