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

Commit 513100fe authored by Charles Chen's avatar Charles Chen Committed by Automerger Merge Worker
Browse files

Merge "Try to fix ActivityThreadTest failure on foldables" into sc-v2-dev am:...

Merge "Try to fix ActivityThreadTest failure on foldables" into sc-v2-dev am: 88c6602e am: 9bc0350c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16280314

Change-Id: Iea3efbf991883bcb992625ece9e69e115d794414
parents 920e9e56 9bc0350c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -309,18 +309,22 @@ public class ActivityThreadTest {
        final int numOfConfig = activity.mNumOfConfigChanges;

        final Configuration processConfigLandscape = new Configuration();
        processConfigLandscape.orientation = ORIENTATION_LANDSCAPE;
        processConfigLandscape.windowConfiguration.setBounds(new Rect(0, 0, 100, 60));
        processConfigLandscape.seq = BASE_SEQ + 1;

        final Configuration activityConfigLandscape = new Configuration();
        activityConfigLandscape.orientation = ORIENTATION_LANDSCAPE;
        activityConfigLandscape.windowConfiguration.setBounds(new Rect(0, 0, 100, 50));
        activityConfigLandscape.seq = BASE_SEQ + 2;

        final Configuration processConfigPortrait = new Configuration();
        processConfigPortrait.orientation = ORIENTATION_PORTRAIT;
        processConfigPortrait.windowConfiguration.setBounds(new Rect(0, 0, 60, 100));
        processConfigPortrait.seq = BASE_SEQ + 3;

        final Configuration activityConfigPortrait = new Configuration();
        activityConfigPortrait.orientation = ORIENTATION_PORTRAIT;
        activityConfigPortrait.windowConfiguration.setBounds(new Rect(0, 0, 50, 100));
        activityConfigPortrait.seq = BASE_SEQ + 4;

@@ -348,7 +352,8 @@ public class ActivityThreadTest {
        assertEquals(activityConfigPortrait.windowConfiguration.getBounds(), bounds);

        // Ensure that Activity#onConfigurationChanged() not be called because the changes in
        // WindowConfiguration shouldn't be reported.
        // WindowConfiguration shouldn't be reported, and we only apply the latest Configuration
        // update in transaction.
        assertEquals(numOfConfig, activity.mNumOfConfigChanges);
    }