mirror of https://github.com/M66B/FairEmail.git
Added logging
This commit is contained in:
parent
75812c06d1
commit
320a196fba
|
@ -314,10 +314,12 @@ public class HtmlHelper {
|
||||||
String cid = "<" + source.substring(4) + ">";
|
String cid = "<" + source.substring(4) + ">";
|
||||||
EntityAttachment attachment = db.attachment().getAttachment(id, cid);
|
EntityAttachment attachment = db.attachment().getAttachment(id, cid);
|
||||||
if (attachment == null) {
|
if (attachment == null) {
|
||||||
|
Log.i("Image not found CID=" + cid);
|
||||||
Drawable d = res.getDrawable(R.drawable.baseline_broken_image_24, theme);
|
Drawable d = res.getDrawable(R.drawable.baseline_broken_image_24, theme);
|
||||||
d.setBounds(0, 0, px, px);
|
d.setBounds(0, 0, px, px);
|
||||||
return d;
|
return d;
|
||||||
} else if (!attachment.available) {
|
} else if (!attachment.available) {
|
||||||
|
Log.i("Image not available CID=" + cid);
|
||||||
Drawable d = res.getDrawable(R.drawable.baseline_photo_library_24, theme);
|
Drawable d = res.getDrawable(R.drawable.baseline_photo_library_24, theme);
|
||||||
d.setBounds(0, 0, px, px);
|
d.setBounds(0, 0, px, px);
|
||||||
return d;
|
return d;
|
||||||
|
@ -325,6 +327,7 @@ public class HtmlHelper {
|
||||||
Bitmap bm = Helper.decodeImage(attachment.getFile(view.getContext()),
|
Bitmap bm = Helper.decodeImage(attachment.getFile(view.getContext()),
|
||||||
res.getDisplayMetrics().widthPixels * 2);
|
res.getDisplayMetrics().widthPixels * 2);
|
||||||
if (bm == null) {
|
if (bm == null) {
|
||||||
|
Log.i("Image not decodable CID=" + cid);
|
||||||
Drawable d = res.getDrawable(R.drawable.baseline_broken_image_24, theme);
|
Drawable d = res.getDrawable(R.drawable.baseline_broken_image_24, theme);
|
||||||
d.setBounds(0, 0, px, px);
|
d.setBounds(0, 0, px, px);
|
||||||
return d;
|
return d;
|
||||||
|
|
Loading…
Reference in New Issue