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

Commit f61e13b8 authored by Louis Chang's avatar Louis Chang
Browse files

Fix activity minWidth/minHeight policy unit test

The test failed on large screen device because the min width/height
constraint is ignored on large screen device.

Bug: 295870984
Test: atest ActivityTaskManagerServiceTests

Change-Id: I5e9b9047c3077674fd46486c3c14a72a75993f14
parent 0d4e74d5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -490,6 +490,11 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase {
                .build();
        final Task task = activity.getTask();
        final TaskDisplayArea tda = task.getDisplayArea();
        // Ensure the display is not a large screen
        if (tda.getConfiguration().smallestScreenWidthDp
                >= WindowManager.LARGE_SCREEN_SMALLEST_SCREEN_WIDTH_DP) {
            resizeDisplay(activity.mDisplayContent, 500, 800);
        }

        // Ignore the activity min width/height for determine multi window eligibility.
        mAtm.mRespectsActivityMinWidthHeightMultiWindow = -1;