1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

Use MimeHeader.* constants when referring to content headers. Minor whitespace changes.

This commit is contained in:
Andrew Chen 2011-11-02 08:34:06 -07:00
parent ea05f3b5d0
commit f884e967c9
3 changed files with 10 additions and 11 deletions

View File

@ -981,7 +981,7 @@ public class MimeUtility {
}
}
}
String[] header = part.getHeader("Content-ID");
String[] header = part.getHeader(MimeHeader.HEADER_CONTENT_ID);
if (header != null) {
for (String s : header) {
if (s.equals(contentId)) {

View File

@ -88,8 +88,8 @@ public class LocalStore extends Store implements Serializable {
set.add("From");
set.add("In-Reply-To");
set.add("References");
set.add("Content-ID");
set.add("Content-Disposition");
set.add(MimeHeader.HEADER_CONTENT_ID);
set.add(MimeHeader.HEADER_CONTENT_DISPOSITION);
set.add("User-Agent");
HEADERS_TO_SAVE = Collections.unmodifiableSet(set);
}

View File

@ -24,6 +24,7 @@ import com.fsck.k9.crypto.PgpData;
import com.fsck.k9.helper.Contacts;
import com.fsck.k9.helper.Utility;
import com.fsck.k9.mail.*;
import com.fsck.k9.mail.internet.MimeHeader;
import com.fsck.k9.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.LocalStore;
@ -249,9 +250,8 @@ public class SingleMessageView extends LinearLayout {
}
}
public void renderAttachments(Part part, int depth,
Message message, Account account, MessagingController controller, MessagingListener listener) throws MessagingException {
public void renderAttachments(Part part, int depth, Message message, Account account,
MessagingController controller, MessagingListener listener) throws MessagingException {
if (part.getBody() instanceof Multipart) {
Multipart mp = (Multipart) part.getBody();
@ -264,7 +264,7 @@ public class SingleMessageView extends LinearLayout {
// not attachments. Don't show attachment download buttons for them.
if (contentDisposition != null &&
MimeUtility.getHeaderParameter(contentDisposition, null).matches("^(?i:inline)")
&& part.getHeader("Content-ID") != null) {
&& part.getHeader(MimeHeader.HEADER_CONTENT_ID) != null) {
return;
}
AttachmentView view = (AttachmentView)mInflater.inflate(R.layout.message_view_attachment, null);
@ -275,11 +275,11 @@ public class SingleMessageView extends LinearLayout {
}
}
public void addAttachment(View attachmentView) {
mAttachments.addView(attachmentView);
mAttachments.setVisibility(View.VISIBLE);
}
public void zoom(KeyEvent event) {
if (mScreenReaderEnabled) {
mAccessibleMessageContentView.zoomIn();
@ -291,11 +291,11 @@ public class SingleMessageView extends LinearLayout {
}
}
}
public void beginSelectingText() {
mMessageContentView.emulateShiftHeld();
}
public void resetView() {
setLoadPictures(false);
mMessageContentView.scrollTo(0, 0);
@ -312,5 +312,4 @@ public class SingleMessageView extends LinearLayout {
AttachmentView.AttachmentFileDownloadCallback attachmentCallback) {
this.attachmentCallback = attachmentCallback;
}
}