Loading services/core/java/com/android/server/wm/SnapshotPersistQueue.java +2 −6 Original line number Diff line number Diff line Loading @@ -354,10 +354,8 @@ class SnapshotPersistQueue { bitmap.recycle(); final File file = mPersistInfoProvider.getHighResolutionBitmapFile(mId, mUserId); try { FileOutputStream fos = new FileOutputStream(file); try (FileOutputStream fos = new FileOutputStream(file)) { swBitmap.compress(JPEG, COMPRESS_QUALITY, fos); fos.close(); } catch (IOException e) { Slog.e(TAG, "Unable to open " + file + " for persisting.", e); return false; Loading @@ -375,10 +373,8 @@ class SnapshotPersistQueue { swBitmap.recycle(); final File lowResFile = mPersistInfoProvider.getLowResolutionBitmapFile(mId, mUserId); try { FileOutputStream lowResFos = new FileOutputStream(lowResFile); try (FileOutputStream lowResFos = new FileOutputStream(lowResFile)) { lowResBitmap.compress(JPEG, COMPRESS_QUALITY, lowResFos); lowResFos.close(); } catch (IOException e) { Slog.e(TAG, "Unable to open " + lowResFile + " for persisting.", e); return false; Loading Loading
services/core/java/com/android/server/wm/SnapshotPersistQueue.java +2 −6 Original line number Diff line number Diff line Loading @@ -354,10 +354,8 @@ class SnapshotPersistQueue { bitmap.recycle(); final File file = mPersistInfoProvider.getHighResolutionBitmapFile(mId, mUserId); try { FileOutputStream fos = new FileOutputStream(file); try (FileOutputStream fos = new FileOutputStream(file)) { swBitmap.compress(JPEG, COMPRESS_QUALITY, fos); fos.close(); } catch (IOException e) { Slog.e(TAG, "Unable to open " + file + " for persisting.", e); return false; Loading @@ -375,10 +373,8 @@ class SnapshotPersistQueue { swBitmap.recycle(); final File lowResFile = mPersistInfoProvider.getLowResolutionBitmapFile(mId, mUserId); try { FileOutputStream lowResFos = new FileOutputStream(lowResFile); try (FileOutputStream lowResFos = new FileOutputStream(lowResFile)) { lowResBitmap.compress(JPEG, COMPRESS_QUALITY, lowResFos); lowResFos.close(); } catch (IOException e) { Slog.e(TAG, "Unable to open " + lowResFile + " for persisting.", e); return false; Loading