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

Commit b926bb83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correct crop on corresponding rotation animation" into main

parents 9c4fe474 8c56e343
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -357,15 +357,18 @@ class ScreenRotationAnimation {

    private void startDisplayRotation(@NonNull ArrayList<Animator> animations,
            @NonNull Runnable finishCallback, @NonNull ShellExecutor mainExecutor) {
        final Rect clipRect = com.android.window.flags.Flags.noAlphaRotationEnterAnimation()
                ? new Rect(0, 0, mEndWidth, mEndHeight) : null;
        buildSurfaceAnimation(animations, mRotateEnterAnimation, getEnterSurface(), finishCallback,
                mTransactionPool, mainExecutor, null /* position */, 0 /* cornerRadius */,
                null /* clipRect */, null);
                clipRect, null);
    }

    private void startScreenshotRotationAnimation(@NonNull ArrayList<Animator> animations,
            @NonNull Runnable finishCallback, @NonNull ShellExecutor mainExecutor) {
        final Rect clipRect = com.android.window.flags.Flags.noAlphaRotationEnterAnimation()
                ? new Rect(0, 0, mEndWidth, mEndHeight) : null;
                // Inverse size because the screenshot layer has rotated transformation.
                ? new Rect(0, 0, mStartHeight, mStartWidth) : null;
        buildSurfaceAnimation(animations, mRotateExitAnimation, mAnimLeash, finishCallback,
                mTransactionPool, mainExecutor, null /* position */, 0 /* cornerRadius */,
                clipRect, null);
@@ -373,12 +376,9 @@ class ScreenRotationAnimation {

    private void buildScreenshotAlphaAnimation(@NonNull ArrayList<Animator> animations,
            @NonNull Runnable finishCallback, @NonNull ShellExecutor mainExecutor) {
        final Rect clipRect = com.android.window.flags.Flags.noAlphaRotationEnterAnimation()
                // Inverse size because the screenshot layer has rotated transformation.
                ? new Rect(0, 0, mStartHeight, mStartWidth) : null;
        buildSurfaceAnimation(animations, mRotateAlphaAnimation, mAnimLeash, finishCallback,
                mTransactionPool, mainExecutor, null /* position */, 0 /* cornerRadius */,
                clipRect, null);
                null /* clipRect */, null);
    }

    private void buildLumaAnimation(@NonNull ArrayList<Animator> animations,