Merge changes from topic "revert-14802973-JAWUFIIXLT" into sc-dev

* changes:
  Revert "Only rescale wallpaper if its > display height"
  Revert "Cache set wallpaper as PNG instead of JPEG"
This commit is contained in:
Owen Kim
2021-06-07 09:29:48 +00:00
committed by Android (Google) Code Review

View File

@@ -628,7 +628,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
} }
// scale if the crop height winds up not matching the recommended metrics // scale if the crop height winds up not matching the recommended metrics
needScale = cropHint.height() > wpData.mHeight needScale = wpData.mHeight != cropHint.height()
|| cropHint.height() > GLHelper.getMaxTextureSize() || cropHint.height() > GLHelper.getMaxTextureSize()
|| cropHint.width() > GLHelper.getMaxTextureSize(); || cropHint.width() > GLHelper.getMaxTextureSize();
@@ -752,7 +752,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
f = new FileOutputStream(wallpaper.cropFile); f = new FileOutputStream(wallpaper.cropFile);
bos = new BufferedOutputStream(f, 32*1024); bos = new BufferedOutputStream(f, 32*1024);
finalCrop.compress(Bitmap.CompressFormat.PNG, 100, bos); finalCrop.compress(Bitmap.CompressFormat.JPEG, 100, bos);
bos.flush(); // don't rely on the implicit flush-at-close when noting success bos.flush(); // don't rely on the implicit flush-at-close when noting success
success = true; success = true;
} }