Fix crashes

This commit is contained in:
NekoInverter committed 2021-01-03 15:16:01 +08:00
1 parent c20faa7259
commit 5a0aafc8e8
2 files changed
+23 -2

No files matched your search

@@ -862,7 +862,11 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
return;
}
if (!mGalleryProvider.save(page, UniFile.fromMediaUri(this, imageUri))) {
resolver.delete(imageUri, null, null);
try {
resolver.delete(imageUri, null, null);
} catch (Exception e) {
e.printStackTrace();
}
Toast.makeText(this, R.string.error_cant_save_image, Toast.LENGTH_SHORT).show();
return;
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {