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

Commit 884041b6 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Only fade window token on exact rotation change" into sc-dev am: ea3bffe5

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

Change-Id: Iddd31a27fc089d97dbea7a44e19b5e26aee72b3a
parents 77b7e113 ea3bffe5
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2998,6 +2998,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        // Hide the windows which are not significant in rotation animation. So that the windows
        // Hide the windows which are not significant in rotation animation. So that the windows
        // don't need to block the unfreeze time.
        // don't need to block the unfreeze time.
        if (screenRotationAnimation != null && screenRotationAnimation.hasScreenshot()
        if (screenRotationAnimation != null && screenRotationAnimation.hasScreenshot()
                // Do not fade for freezing without rotation change.
                && mDisplayRotation.getRotation() != getWindowConfiguration().getRotation()
                && mFadeRotationAnimationController == null) {
                && mFadeRotationAnimationController == null) {
            startFadeRotationAnimation(false /* shouldDebounce */);
            startFadeRotationAnimation(false /* shouldDebounce */);
        }
        }
+1 −0
Original line number Original line Diff line number Diff line
@@ -1275,6 +1275,7 @@ public class DisplayContentTests extends WindowTestsBase {
        // Assume that the display rotation is changed so it is frozen in preparation for animation.
        // Assume that the display rotation is changed so it is frozen in preparation for animation.
        doReturn(true).when(rotationAnim).hasScreenshot();
        doReturn(true).when(rotationAnim).hasScreenshot();
        mWm.mDisplayFrozen = true;
        mWm.mDisplayFrozen = true;
        displayContent.getDisplayRotation().setRotation((displayContent.getRotation() + 1) % 4);
        displayContent.setRotationAnimation(rotationAnim);
        displayContent.setRotationAnimation(rotationAnim);
        // The fade rotation animation also starts to hide some non-app windows.
        // The fade rotation animation also starts to hide some non-app windows.
        assertNotNull(displayContent.getFadeRotationAnimationController());
        assertNotNull(displayContent.getFadeRotationAnimationController());