Merge "Correctly serialize population" into sc-dev

This commit is contained in:
Lucas Dupin
2021-06-23 18:48:37 +00:00
committed by Android (Google) Code Review

View File

@@ -420,7 +420,7 @@ public final class WallpaperColors implements Parcelable {
for (Map.Entry<Integer, Integer> 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);
}