Skip to content

Commit

Permalink
permission bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearfog committed Sep 20, 2024
1 parent 59a86d4 commit 1b1c334
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected void storeImage(Uri uri) {
File imageFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
destMediaFile = new File(imageFolder, imageName);
srcMediaUri = uri;
if (ActivityCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q || ActivityCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
saveImage();
} else {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, WRITE_EXTERNAL_STORAGE))
Expand Down

0 comments on commit 1b1c334

Please sign in to comment.