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

Commit a13a41dc authored by Craig Mautner's avatar Craig Mautner
Browse files

Perform all layouts within first loop.

Do not begin animation while layout requests are still
outstanding.

Bug: 7333622 fixed.
Change-Id: I77c2cdc123c1e26f9661feade0d9a1843c75d5f6
parent f6dbd61b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -8117,8 +8117,16 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    private boolean mInLayout = false;
    private final void performLayoutAndPlaceSurfacesLocked() {
        do {
            mTraversalScheduled = false;
            performLayoutAndPlaceSurfacesLockedLoop();
            mH.removeMessages(H.DO_TRAVERSAL);
        } while (mTraversalScheduled);
    }

    private boolean mInLayout = false;
    private final void performLayoutAndPlaceSurfacesLockedLoop() {
        if (mInLayout) {
            if (DEBUG) {
                throw new RuntimeException("Recursive call!");