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

Commit 3eade1b3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Do not associate staring window to task for rotation change" into...

Merge "Do not associate staring window to task for rotation change" into udc-qpr-dev am: 8cfba905 am: 851bfa51

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



Change-Id: I475dea388ac92dee4164a59b748ed459b8b37581
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b34838a5 851bfa51
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2334,6 +2334,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            mDisplayContent.updateImeControlTarget(isImeLayeringTarget() /* updateImeParent */);
            // Fix the starting window to task when Activity has changed.
            if (mStartingData != null && mStartingData.mAssociatedTask == null
                    && mTempConfiguration.windowConfiguration.getRotation()
                            == selfConfiguration.windowConfiguration.getRotation()
                    && !mTempConfiguration.windowConfiguration.getBounds().equals(getBounds())) {
                mStartingData.mResizedFromTransfer = true;
                // Lock the starting window to task, so it won't resize from transfer anymore.
+3 −0
Original line number Diff line number Diff line
@@ -2939,6 +2939,9 @@ public class ActivityRecordTests extends WindowTestsBase {
        // transform to activity1.
        int rotation = (mDisplayContent.getRotation() + 1) % 4;
        mDisplayContent.setFixedRotationLaunchingApp(activity, rotation);
        // The configuration with rotation change should not trigger task-association.
        assertNotNull(activity.mStartingData);
        assertNull(activity.mStartingData.mAssociatedTask);
        doReturn(rotation).when(mDisplayContent)
                .rotationForActivityInDifferentOrientation(topActivity);