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

Commit c1a15b81 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "WM: Guard against released surfaces in forced rotator"

parents a2ccaf6e 4a17e475
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -75,6 +75,7 @@ public class ForcedSeamlessRotator {
    public void finish(WindowToken token, WindowState win) {
    public void finish(WindowToken token, WindowState win) {
        mTransform.reset();
        mTransform.reset();
        token.getPendingTransaction().setMatrix(token.mSurfaceControl, mTransform, mFloat9);
        token.getPendingTransaction().setMatrix(token.mSurfaceControl, mTransform, mFloat9);
        if (win.mWinAnimator.mSurfaceController != null) {
            token.getPendingTransaction().deferTransactionUntil(token.mSurfaceControl,
            token.getPendingTransaction().deferTransactionUntil(token.mSurfaceControl,
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.getFrameNumber());
                    win.getFrameNumber());
@@ -82,6 +83,7 @@ public class ForcedSeamlessRotator {
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.getFrameNumber());
                    win.getFrameNumber());
        }
        }
    }


    public void dump(PrintWriter pw) {
    public void dump(PrintWriter pw) {
        pw.print("{old="); pw.print(mOldRotation); pw.print(", new="); pw.print(mNewRotation);
        pw.print("{old="); pw.print(mOldRotation); pw.print(", new="); pw.print(mNewRotation);