1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 00:25:10 -04:00

First bits of infrastructure for not showing HTML-mail inline images as

downloadable attachments
This commit is contained in:
Jesse Vincent 2010-07-19 06:13:41 +00:00
parent 65e318a80e
commit 75b8487024

View File

@ -1803,6 +1803,22 @@ public class MessageView extends K9Activity implements OnClickListener
String contentType = MimeUtility.unfoldAndDecode(part.getContentType());
String contentDisposition = MimeUtility.unfoldAndDecode(part.getDisposition());
String name = MimeUtility.getHeaderParameter(contentType, "name");
// Inline parts with a content-id are almost certainly components of an HTML message
// not attachments. Don't show attachment download buttons for them.
//
// TODO: This code won't work until we correct attachment storage
if ("inline".equalsIgnoreCase(MimeUtility.getHeaderParameter(contentDisposition, null))
&& part.getHeader("Content-Id") != null)
{
return;
}
if (name == null)
{
name = MimeUtility.getHeaderParameter(contentDisposition, "filename");