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

Commit 6ad0de2e authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Use seamless for collecting transition with fixed rotation" into...

Merge "Use seamless for collecting transition with fixed rotation" into tm-qpr-dev am: 1b89cdbd am: c974894b

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



Change-Id: I1c1a7ab63f7611e981f7b7f0e151c9f5b8937485
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 63b76294 c974894b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7672,6 +7672,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // This activity may relaunch or perform configuration change so once it has reported drawn,
        // the screen can be unfrozen.
        ensureActivityConfiguration(0 /* globalChanges */, !PRESERVE_WINDOWS);
        if (mTransitionController.isCollecting(this)) {
            // In case the task was changed from PiP but still keeps old transform.
            task.resetSurfaceControlTransforms();
        }
    }

    void setRequestedOrientation(int requestedOrientation) {
+14 −6
Original line number Diff line number Diff line
@@ -3392,6 +3392,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            if (!controller.isCollecting(this)) {
                controller.collect(this);
                startAsyncRotationIfNeeded();
                if (mFixedRotationLaunchingApp != null) {
                    setSeamlessTransitionForFixedRotation(controller.getCollectingTransition());
                }
            }
            return;
        }
@@ -3401,12 +3404,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY);
            if (mFixedRotationLaunchingApp != null) {
                // A fixed-rotation transition is done, then continue to start a seamless display
                // transition. And be fore the start transaction is applied, the non-app windows
                // need to keep in previous rotation to avoid showing inconsistent content.
                t.setSeamlessRotation(this);
                if (mAsyncRotationController != null) {
                    mAsyncRotationController.keepAppearanceInPreviousRotation();
                }
                // transition.
                setSeamlessTransitionForFixedRotation(t);
            } else if (isRotationChanging()) {
                if (displayChange != null) {
                    final boolean seamless = mDisplayRotation.shouldRotateSeamlessly(
@@ -3425,6 +3424,15 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }
    }

    private void setSeamlessTransitionForFixedRotation(Transition t) {
        t.setSeamlessRotation(this);
        // Before the start transaction is applied, the non-app windows need to keep in previous
        // rotation to avoid showing inconsistent content.
        if (mAsyncRotationController != null) {
            mAsyncRotationController.keepAppearanceInPreviousRotation();
        }
    }

    /** If the display is in transition, there should be a screenshot covering it. */
    @Override
    boolean inTransition() {