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

Commit 526f0a0e authored by Mathias Agopian's avatar Mathias Agopian
Browse files

Fix a hang in SF caused by invalid transform matrix from the WM

WindowManager could create by transforms because of divide by zero.

Bug: 5422468
Change-Id: I782f87ebb78b5ff23750e22837f36ca6cfed1f2f
parent 0d0fba45
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1120,10 +1120,14 @@ final class WindowState implements WindowManagerPolicy.WindowState {
                // window's center).
                final float w = frame.width();
                final float h = frame.height();
                if (w>=1 && h>=1) {
                    tmpMatrix.setScale(1 + 2/w, 1 + 2/h, w/2, h/2);
                } else {
                    tmpMatrix.reset();
                }
            } else {
                tmpMatrix.reset();
            }
            tmpMatrix.postScale(mGlobalScale, mGlobalScale);
            if (selfTransformation) {
                tmpMatrix.postConcat(mTransformation.getMatrix());