Skip to content

Commit

Permalink
Replace to rwt as per Google recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski committed Sep 26, 2024
1 parent 47bfbb9 commit a24b486
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Throwable> {

private static final String CONTENT_SCHEME = "content";

private static final String WRITE_AND_TRUNCATE = "wt";
private static final String READ_WRITE_AND_TRUNCATE = "rwt";

private final WeakReference<Context> mContext;

Expand Down Expand Up @@ -215,7 +215,7 @@ private void saveImage(@NonNull Bitmap croppedBitmap) {
OutputStream outputStream = null;
ByteArrayOutputStream outStream = null;
try {
outputStream = context.getContentResolver().openOutputStream(mImageOutputUri, WRITE_AND_TRUNCATE);
outputStream = context.getContentResolver().openOutputStream(mImageOutputUri, READ_WRITE_AND_TRUNCATE);
outStream = new ByteArrayOutputStream();
croppedBitmap.compress(mCompressFormat, mCompressQuality, outStream);
outputStream.write(outStream.toByteArray());
Expand Down

0 comments on commit a24b486

Please sign in to comment.