summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wilsonshih <wilsonshih@google.com> 2025-02-17 08:30:03 +0000
committer wilsonshih <wilsonshih@google.com> 2025-02-17 08:44:06 +0000
commitd6647b9dab27e55050d244e39a0bbdeff077b5f4 (patch)
treee0128eeb8ee3b465e5cd80b26de32c03428ec2cd
parent0e0e1d3ed644499b0d5650e1608b64e48b87bd85 (diff)
Fixes SystemUI crash when creating splash screen...
...because of invalidate adaptive icon format. The foreground of adaptive icon can be null. Flag: EXEMPT bugfix Bug: 391243082 Test: launch sample app and verify no crash. Test: atest SplashscreenTests Change-Id: I9fa9b8fce13e0343a583717f6d90949ea086af6b
-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)))) {