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

Commit b620e432 authored by Jordan Silva's avatar Jordan Silva Committed by Android (Google) Code Review
Browse files

Merge "Fix split snapshot broken after rotating in fake orientation" into main

parents 2c3ebd71 a3b66f59
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -2667,6 +2667,20 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo
            // Let system take care of the rotation
            return;
        }

        if (mRunningTaskShowScreenshot) {
            animateRotation(newRotation);
        } else {
            // Animate the rotation and stops running task
            switchToScreenshot(() -> {
                animateRotation(newRotation);
                finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                        null /* onFinishComplete */);
            });
        }
    }

    private void animateRotation(int newRotation) {
        AnimatorSet pa = setRecentsChangedOrientation(true);
        pa.addListener(AnimatorListeners.forSuccessCallback(() -> {
            setLayoutRotation(newRotation, mOrientationState.getDisplayRotation());
@@ -5925,7 +5939,7 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo
            return;
        }

        taskView.setShouldShowScreenshot(true);
        setRunningTaskViewShowScreenshot(true);
        for (TaskContainer container : taskView.getTaskContainers()) {
            if (container == null) {
                continue;