From c2e0cc3cc775444ad8eb578ed63e09a708c96271 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 21 Aug 2019 17:25:23 +0200 Subject: [PATCH] Added attachments breadcrumb --- app/src/main/java/eu/faircode/email/MessageHelper.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 686701f261..4c92db07fa 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -40,7 +40,9 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Date; import java.util.Enumeration; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Properties; import java.util.TimeZone; @@ -876,9 +878,15 @@ public class MessageHelper { } if (!found) { + Map crumb = new HashMap<>(); + crumb.put("local", local.toString()); Log.w("Attachment not found local=" + local); - for (EntityAttachment remote : remotes) + for (int i = 0; i < remotes.size(); i++) { + EntityAttachment remote = remotes.get(i); + crumb.put("remote:" + i, remote.toString()); Log.w("Attachment remote=" + remote); + } + Log.breadcrumb("attachments", crumb); throw new IllegalArgumentException("Attachment not found"); } }