diff options
author | Catherine Liang <cathliang@google.com> | 2023-11-03 09:45:17 +0800 |
---|---|---|
committer | Catherine Liang <cathliang@google.com> | 2023-11-08 19:05:53 +0000 |
commit | 86c300e721377fc4081a7f424e3b58cc422c5c15 (patch) | |
tree | fcc52f5816188796bde371d3a9400a80f6a0d336 /src/com/android/customization | |
parent | f263efdb18f0144185c99ac63c415291b220ebe5 (diff) | |
download | ThemePicker-86c300e721377fc4081a7f424e3b58cc422c5c15.tar.gz |
Fix color logging crash
Bug: 309005949
Test: manually tested different wallpaper & other color options
Flag: NONE
Change-Id: I511c78a12aec1c7544c75ad7c5034c1c7d739012
Diffstat (limited to 'src/com/android/customization')
-rw-r--r-- | src/com/android/customization/model/color/ColorOption.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/customization/model/color/ColorOption.java b/src/com/android/customization/model/color/ColorOption.java index 30352217..77fe4044 100644 --- a/src/com/android/customization/model/color/ColorOption.java +++ b/src/com/android/customization/model/color/ColorOption.java @@ -112,6 +112,9 @@ public abstract class ColorOption implements CustomizationOption<ColorOption> { if (seedColor == null || seedColor.isEmpty()) { return ThemesUserEventLogger.NULL_SEED_COLOR; } + if (!seedColor.startsWith("#")) { + seedColor = "#" + seedColor; + } return Color.parseColor(seedColor); } |