Compress wallpaper to PNG instead of JPEG when setting wallpaper

JPEG is a 'lossy' format, meaning, when image bytes are encoded to JPEG,
the decoded JPEG's image bytes won't match the input, no matter how high
the compression quality.

Using PNG ensures the same pixels Wallpaper Picker used to generate the
image preview are the same pixels the system will use to quantize the
image, ensuring any colors Wallpaper Picker shows will be the same
colors applied to the system.

Alternatively, WallpaperPicker could compress
to JPEG then decompress, and use that Bitmap with
WallpaperColors.fromBitmap, but that adds unnecessary work IMHO. It is
better to have the image bytes always match what the user is seeing in
the preview than use lossy compression + add latency.

Bug: 189931209
Test: Log lines in WallpaperColors/WallpaperManagerService/
WallpaperPicker/Palette log the hash of their version of the Bitmap's
bytes. Without this change, the hash differs between the preview and
framework's view of it.

Change-Id: I1ca71ccfc62d203ef65d4dfec661e36f91c2c221
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
index 0060f99..bf86585 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -484,7 +484,7 @@
     private int setBitmapToWallpaperManagerCompat(Bitmap wallpaperBitmap, boolean allowBackup,
             int whichWallpaper) {
         ByteArrayOutputStream tmpOut = new ByteArrayOutputStream();
-        if (wallpaperBitmap.compress(CompressFormat.JPEG, DEFAULT_COMPRESS_QUALITY, tmpOut)) {
+        if (wallpaperBitmap.compress(CompressFormat.PNG, DEFAULT_COMPRESS_QUALITY, tmpOut)) {
             try {
                 byte[] outByteArray = tmpOut.toByteArray();
                 return mWallpaperManagerCompat.setStream(