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
This commit is contained in:
Lucas Dupin
2021-06-23 09:30:24 -07:00
parent 7712f3bc0a
commit ebd663f556

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);
}