Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdfbef2e authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Correct lossless compression target" into main

parents 58fefa31 c4716ee7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -481,7 +481,8 @@ class SnapshotPersistQueue {
            }
            final File file = mPersistInfoProvider.getHighResolutionBitmapFile(mId, mUserId);
            try (FileOutputStream fos = new FileOutputStream(file)) {
                swBitmap.compress(JPEG, COMPRESS_QUALITY, fos);
                swBitmap.compress(Flags.respectRequestedTaskSnapshotResolution() ? PNG : JPEG,
                        COMPRESS_QUALITY, fos);
            } catch (IOException e) {
                Slog.e(TAG, "Unable to open " + file + " for persisting.", e);
                return false;
@@ -510,8 +511,7 @@ class SnapshotPersistQueue {

            final File lowResFile = mPersistInfoProvider.getLowResolutionBitmapFile(mId, mUserId);
            try (FileOutputStream lowResFos = new FileOutputStream(lowResFile)) {
                lowResBitmap.compress(Flags.respectRequestedTaskSnapshotResolution() ? PNG : JPEG,
                        COMPRESS_QUALITY, lowResFos);
                lowResBitmap.compress(JPEG, COMPRESS_QUALITY, lowResFos);
            } catch (IOException e) {
                Slog.e(TAG, "Unable to open " + lowResFile + " for persisting.", e);
                return false;