Show body size

This commit is contained in:
M66B
2019-09-30 21:00:28 +02:00
parent b3f34ec0c9
commit 23df3a100a
9 changed files with 1930 additions and 16 deletions

View File

@@ -892,6 +892,17 @@ public class MessageHelper {
return (html == null);
}
Long getBodySize() throws MessagingException {
Part part = (html == null ? plain : html);
if (part == null)
return null;
int size = part.getSize();
if (size < 0)
return null;
else
return (long) size;
}
String getHtml(Context context) throws MessagingException, IOException {
if (plain == null && html == null) {
Log.i("No body part");