From ebd663f556249d35ea18e0d49dc35759cfa08924 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Wed, 23 Jun 2021 09:30:24 -0700 Subject: [PATCH] Correctly serialize population All populations were being set to 0, causing all colors to be wrong. Test: manual Bug: 191391779 Bug: 191374703 Change-Id: Id5bef180ca3e6f30e30631781a74b2efb4402ac5 --- core/java/android/app/WallpaperColors.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java index 2777a7aae517c..7ef0a19ec44c3 100644 --- a/core/java/android/app/WallpaperColors.java +++ b/core/java/android/app/WallpaperColors.java @@ -420,7 +420,7 @@ public final class WallpaperColors implements Parcelable { for (Map.Entry colorEntry : mAllColors.entrySet()) { if (colorEntry.getKey() != null) { dest.writeInt(colorEntry.getKey()); - Integer population = mAllColors.get(colorEntry.getValue()); + Integer population = colorEntry.getValue(); int populationInt = (population != null) ? population : 0; dest.writeInt(populationInt); }