mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 10:47:28 +00:00
Added logging
This commit is contained in:
parent
4324d22585
commit
ac3ac4330f
1 changed files with 11 additions and 1 deletions
|
@ -4258,9 +4258,10 @@ public class MessageHelper {
|
||||||
try {
|
try {
|
||||||
Log.d("Part class=" + part.getClass() + " type=" + part.getContentType());
|
Log.d("Part class=" + part.getClass() + " type=" + part.getContentType());
|
||||||
|
|
||||||
// https://github.com/autocrypt/protected-headers
|
|
||||||
try {
|
try {
|
||||||
ContentType ct = new ContentType(part.getContentType());
|
ContentType ct = new ContentType(part.getContentType());
|
||||||
|
|
||||||
|
// https://github.com/autocrypt/protected-headers
|
||||||
if ("v1".equals(ct.getParameter("protected-headers"))) {
|
if ("v1".equals(ct.getParameter("protected-headers"))) {
|
||||||
String[] subject = part.getHeader("subject");
|
String[] subject = part.getHeader("subject");
|
||||||
if (subject != null && subject.length != 0) {
|
if (subject != null && subject.length != 0) {
|
||||||
|
@ -4268,6 +4269,15 @@ public class MessageHelper {
|
||||||
parts.protected_subject = decodeMime(subject[0]);
|
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) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue