mirror of https://github.com/M66B/FairEmail.git
Improved DecodeException handling
This commit is contained in:
parent
9ae68499cb
commit
4049621bc0
|
@ -692,7 +692,10 @@ class ImageHelper {
|
|||
at android.graphics.ImageDecoder.decodeDrawableImpl(ImageDecoder.java:1758)
|
||||
at android.graphics.ImageDecoder.decodeDrawable(ImageDecoder.java:1751)
|
||||
*/
|
||||
d = new BitmapDrawable(context.getResources(), file.getAbsolutePath());
|
||||
Bitmap bm = _decodeImage(file, scaleToPixels);
|
||||
if (bm == null)
|
||||
throw new FileNotFoundException(file.getAbsolutePath());
|
||||
d = new BitmapDrawable(context.getResources(), bm);
|
||||
}
|
||||
|
||||
d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
|
||||
|
|
Loading…
Reference in New Issue