summaryrefslogtreecommitdiff
path: root/src/com/android/customization
diff options
context:
space:
mode:
authorCatherine Liang <cathliang@google.com>2023-11-03 09:45:17 +0800
committerCatherine Liang <cathliang@google.com>2023-11-08 19:05:53 +0000
commit86c300e721377fc4081a7f424e3b58cc422c5c15 (patch)
treefcc52f5816188796bde371d3a9400a80f6a0d336 /src/com/android/customization
parentf263efdb18f0144185c99ac63c415291b220ebe5 (diff)
downloadThemePicker-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.java3
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);
}