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

Commit d2eceabf authored by Nick Chameyev's avatar Nick Chameyev Committed by Automerger Merge Worker
Browse files

Merge "Do not run rotation animation when folding/unfolding" into sc-v2-dev...

Merge "Do not run rotation animation when folding/unfolding" into sc-v2-dev am: 56b94310 am: 6bcc065d

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

Change-Id: I913dca6b000f56711dd140cb61d09b4cc779bd24
parents 336291ea 6bcc065d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5830,7 +5830,9 @@ public class WindowManagerService extends IWindowManager.Stub
            return;
        }

        if (!displayContent.isReady() || !mPolicy.isScreenOn() || !displayContent.okToAnimate()) {
        if (!displayContent.isReady() || !displayContent.getDisplayPolicy().isScreenOnFully()
                || displayContent.getDisplayInfo().state == Display.STATE_OFF
                || !displayContent.okToAnimate()) {
            // No need to freeze the screen before the display is ready,  if the screen is off,
            // or we can't currently animate.
            return;
+5 −0
Original line number Diff line number Diff line
@@ -1752,6 +1752,11 @@ public class ActivityRecordTests extends WindowTestsBase {
                anyInt() /* orientation */, anyInt() /* lastRotation */);
        // Set to visible so the activity can freeze the screen.
        activity.setVisibility(true);
        // Update the display policy to make the screen fully turned on so the freeze is allowed
        display.getDisplayPolicy().screenTurnedOn(null);
        display.getDisplayPolicy().finishKeyguardDrawn();
        display.getDisplayPolicy().finishWindowsDrawn();
        display.getDisplayPolicy().finishScreenTurningOn();

        display.rotateInDifferentOrientationIfNeeded(activity);
        display.setFixedRotationLaunchingAppUnchecked(activity);