Added logging

pull/209/head
M66B 2 years ago
parent 4324d22585
commit ac3ac4330f

@ -4258,9 +4258,10 @@ public class MessageHelper {
try {
Log.d("Part class=" + part.getClass() + " type=" + part.getContentType());
// https://github.com/autocrypt/protected-headers
try {
ContentType ct = new ContentType(part.getContentType());
// https://github.com/autocrypt/protected-headers
if ("v1".equals(ct.getParameter("protected-headers"))) {
String[] subject = part.getHeader("subject");
if (subject != null && subject.length != 0) {
@ -4268,6 +4269,15 @@ public class MessageHelper {
parts.protected_subject = decodeMime(subject[0]);
}
}
// https://en.wikipedia.org/wiki/MIME#Multipart_subtypes
if ("multipart".equals(ct.getPrimaryType()) &&
!("mixed".equalsIgnoreCase(ct.getSubType()) ||
"alternative".equalsIgnoreCase(ct.getSubType()) ||
"related".equalsIgnoreCase(ct.getSubType()) ||
"report".equalsIgnoreCase(ct.getSubType()))) {
Log.e(part.getContentType());
}
} catch (Throwable ex) {
Log.e(ex);
}

Loading…
Cancel
Save