summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Sheng Shih <wilsonshih@google.com> 2025-02-17 18:26:26 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-17 18:26:26 -0800
commit2cac569b4d116458dc51c801bf51a4d1b7433703 (patch)
tree98ff5ba6ba69dadcdb86bcc2be23a2641fd46370
parentcd3195440743aa0b353c41e106f5a9f4c81d89a6 (diff)
parentd6647b9dab27e55050d244e39a0bbdeff077b5f4 (diff)
Merge "Fixes SystemUI crash when creating splash screen..." into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
index c5994f83429a..e132c5ee7c6b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
@@ -681,7 +681,8 @@ public class SplashscreenContentDrawer {
// C. The background of the adaptive icon is grayscale, and the foreground of the
// adaptive icon forms a certain contrast with the theme color.
// D. Didn't specify icon background color.
- if (!iconColor.mIsBgComplex && mTmpAttrs.mIconBgColor == Color.TRANSPARENT
+ if (iconForeground != null
+ && !iconColor.mIsBgComplex && mTmpAttrs.mIconBgColor == Color.TRANSPARENT
&& (isRgbSimilarInHsv(mThemeColor, iconColor.mBgColor)
|| (iconColor.mIsBgGrayscale
&& !isRgbSimilarInHsv(mThemeColor, iconColor.mFgColor)))) {