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

Commit 4a17e475 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

WM: Guard against released surfaces in forced rotator

Fixes: 119470176
Test: Rotate phone with cutout enabled, verify cutout overlay is still properly synchornized and SystemUI does not crash.
(cherry picked from commit dcb24ca4)

Merged-In: Ibce67ccede8f114b82779a74853e43b3abe44c55
Change-Id: Ibce67ccede8f114b82779a74853e43b3abe44c55
parent 5bdf255e
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public class ForcedSeamlessRotator {
    public void finish(WindowToken token, WindowState win) {
        mTransform.reset();
        token.getPendingTransaction().setMatrix(token.mSurfaceControl, mTransform, mFloat9);
        if (win.mWinAnimator.mSurfaceController != null) {
            token.getPendingTransaction().deferTransactionUntil(token.mSurfaceControl,
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.getFrameNumber());
@@ -82,6 +83,7 @@ public class ForcedSeamlessRotator {
                    win.mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                    win.getFrameNumber());
        }
    }

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