mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Check resolver input/output streams
This commit is contained in:
@@ -407,6 +407,8 @@ class ImageHelper {
|
||||
Bitmap bm;
|
||||
int scaleToPixels = res.getDisplayMetrics().widthPixels;
|
||||
try (InputStream is = context.getContentResolver().openInputStream(uri)) {
|
||||
if (is == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
bm = getScaledBitmap(is, a.source, null, scaleToPixels);
|
||||
if (bm == null)
|
||||
throw new FileNotFoundException(a.source);
|
||||
|
||||
Reference in New Issue
Block a user