summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2019-07-16 15:42:48 -0700
committer Lucas Dupin <dupin@google.com> 2019-07-19 21:05:09 +0000
commit68f5dae5b6489f982f55e0e8fc951bd084deb65f (patch)
treef5ceed2e61a5fa2e4e15d99e578e9fe9f851c93a
parent4b09d08c6c26bff1406b5785dd9942c764ffce49 (diff)
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 1c72bc21514eb6b76f80cef68be1245fb5d4f423)
-rw-r--r--packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java b/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java
index 0e93f42a3554..d3e8b3d3236e 100644
--- a/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java
+++ b/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java
@@ -77,7 +77,7 @@ public class SysuiColorExtractor extends ColorExtractor implements Dumpable,
protected void extractWallpaperColors() {
super.extractWallpaperColors();
// 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;
}
mTonal.applyFallback(mLockColors == null ? mSystemColors : mLockColors, mNeutralColorsLock);