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

Commit 68f5dae5 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix class initialization issue

We were getting an NPE because the superclass was
calling an overridden method on its constructor,
before the variable could be initialized.

Test: atest ScrimControllerTest
Fixes: 137665467
Fixes: 137878476
Change-Id: I8914eac86cac19d92a68a2d55d97dfcee4066ed3
(cherry picked from commit 1c72bc21)
parent 4b09d08c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -77,7 +77,7 @@ public class SysuiColorExtractor extends ColorExtractor implements Dumpable,
    protected void extractWallpaperColors() {
    protected void extractWallpaperColors() {
        super.extractWallpaperColors();
        super.extractWallpaperColors();
        // mTonal is final but this method will be invoked by the base class during its ctor.
        // mTonal is final but this method will be invoked by the base class during its ctor.
        if (mTonal == null) {
        if (mTonal == null || mNeutralColorsLock == null) {
            return;
            return;
        }
        }
        mTonal.applyFallback(mLockColors == null ? mSystemColors : mLockColors, mNeutralColorsLock);
        mTonal.applyFallback(mLockColors == null ? mSystemColors : mLockColors, mNeutralColorsLock);