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

Commit 54c821eb authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Avoid initialization race condition

ScrimController#onColorsChanged might arrive before
ScrimController#attachViews, this would cause SysUI to crash loop.

Test: atest ScrimControllerTest
Test: manual
Change-Id: If48cb5f2bfc2251419384e9387590270efe1d787
parent 9f938a6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
    }

    protected void scheduleUpdate() {
        if (mUpdatePending) return;
        if (mUpdatePending || mScrimBehind == null) return;

        // Make sure that a frame gets scheduled.
        mScrimBehind.invalidate();