Loading src/com/fsck/k9/mail/store/local/LocalAttachmentBodyPart.java 0 → 100644 +31 −0 Original line number Diff line number Diff line package com.fsck.k9.mail.store.local; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.internet.MimeBodyPart; public class LocalAttachmentBodyPart extends MimeBodyPart { private long mAttachmentId = -1; public LocalAttachmentBodyPart(Body body, long attachmentId) throws MessagingException { super(body); mAttachmentId = attachmentId; } /** * Returns the local attachment id of this body, or -1 if it is not stored. * @return */ public long getAttachmentId() { return mAttachmentId; } public void setAttachmentId(long attachmentId) { mAttachmentId = attachmentId; } @Override public String toString() { return "" + mAttachmentId; } } No newline at end of file src/com/fsck/k9/mail/store/local/LocalStore.java +2 −53 Original line number Diff line number Diff line Loading @@ -3473,31 +3473,6 @@ public class LocalStore extends Store implements Serializable { } } public static class LocalTextBody extends TextBody { /** * This is an HTML-ified version of the message for display purposes. */ private String mBodyForDisplay; public LocalTextBody(String body) { super(body); } public LocalTextBody(String body, String bodyForDisplay) { super(body); this.mBodyForDisplay = bodyForDisplay; } public String getBodyForDisplay() { return mBodyForDisplay; } public void setBodyForDisplay(String mBodyForDisplay) { this.mBodyForDisplay = mBodyForDisplay; } }//LocalTextBody public class LocalMessage extends MimeMessage { private long mId; private int mAttachmentCount; Loading Loading @@ -3593,8 +3568,8 @@ public class LocalStore extends Store implements Serializable { if (part == null) { // If that fails, try and get a text part. part = MimeUtility.findFirstPartByMimeType(this, "text/plain"); if (part != null && part.getBody() instanceof LocalStore.LocalTextBody) { text = ((LocalStore.LocalTextBody) part.getBody()).getBodyForDisplay(); if (part != null && part.getBody() instanceof LocalTextBody) { text = ((LocalTextBody) part.getBody()).getBodyForDisplay(); } } else { // We successfully found an HTML part; do the necessary character set decoding. Loading Loading @@ -4028,32 +4003,6 @@ public class LocalStore extends Store implements Serializable { } } public static class LocalAttachmentBodyPart extends MimeBodyPart { private long mAttachmentId = -1; public LocalAttachmentBodyPart(Body body, long attachmentId) throws MessagingException { super(body); mAttachmentId = attachmentId; } /** * Returns the local attachment id of this body, or -1 if it is not stored. * @return */ public long getAttachmentId() { return mAttachmentId; } public void setAttachmentId(long attachmentId) { mAttachmentId = attachmentId; } @Override public String toString() { return "" + mAttachmentId; } } static class ThreadInfo { public final long threadId; public final long msgId; Loading src/com/fsck/k9/mail/store/local/LocalTextBody.java 0 → 100644 +28 −0 Original line number Diff line number Diff line package com.fsck.k9.mail.store.local; import com.fsck.k9.mail.internet.TextBody; public class LocalTextBody extends TextBody { /** * This is an HTML-ified version of the message for display purposes. */ private String mBodyForDisplay; public LocalTextBody(String body) { super(body); } public LocalTextBody(String body, String bodyForDisplay) { super(body); this.mBodyForDisplay = bodyForDisplay; } public String getBodyForDisplay() { return mBodyForDisplay; } public void setBodyForDisplay(String mBodyForDisplay) { this.mBodyForDisplay = mBodyForDisplay; } }//LocalTextBody No newline at end of file src/com/fsck/k9/view/AttachmentView.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeHeader; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.store.local.LocalStore.LocalAttachmentBodyPart; import com.fsck.k9.mail.store.local.LocalAttachmentBodyPart; import com.fsck.k9.provider.AttachmentProvider; public class AttachmentView extends FrameLayout implements OnClickListener, OnLongClickListener { Loading src/com/fsck/k9/view/SingleMessageView.java +2 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Multipart; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.store.local.LocalStore; import com.fsck.k9.mail.store.local.LocalAttachmentBodyPart; import com.fsck.k9.mail.store.local.LocalStore.LocalMessage; import com.fsck.k9.provider.AttachmentProvider.AttachmentProviderColumns; Loading Loading @@ -626,7 +626,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener, for (int i = 0; i < mp.getCount(); i++) { renderAttachments(mp.getBodyPart(i), depth + 1, message, account, controller, listener); } } else if (part instanceof LocalStore.LocalAttachmentBodyPart) { } else if (part instanceof LocalAttachmentBodyPart) { AttachmentView view = (AttachmentView)mInflater.inflate(R.layout.message_view_attachment, null); view.setCallback(attachmentCallback); Loading Loading
src/com/fsck/k9/mail/store/local/LocalAttachmentBodyPart.java 0 → 100644 +31 −0 Original line number Diff line number Diff line package com.fsck.k9.mail.store.local; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.internet.MimeBodyPart; public class LocalAttachmentBodyPart extends MimeBodyPart { private long mAttachmentId = -1; public LocalAttachmentBodyPart(Body body, long attachmentId) throws MessagingException { super(body); mAttachmentId = attachmentId; } /** * Returns the local attachment id of this body, or -1 if it is not stored. * @return */ public long getAttachmentId() { return mAttachmentId; } public void setAttachmentId(long attachmentId) { mAttachmentId = attachmentId; } @Override public String toString() { return "" + mAttachmentId; } } No newline at end of file
src/com/fsck/k9/mail/store/local/LocalStore.java +2 −53 Original line number Diff line number Diff line Loading @@ -3473,31 +3473,6 @@ public class LocalStore extends Store implements Serializable { } } public static class LocalTextBody extends TextBody { /** * This is an HTML-ified version of the message for display purposes. */ private String mBodyForDisplay; public LocalTextBody(String body) { super(body); } public LocalTextBody(String body, String bodyForDisplay) { super(body); this.mBodyForDisplay = bodyForDisplay; } public String getBodyForDisplay() { return mBodyForDisplay; } public void setBodyForDisplay(String mBodyForDisplay) { this.mBodyForDisplay = mBodyForDisplay; } }//LocalTextBody public class LocalMessage extends MimeMessage { private long mId; private int mAttachmentCount; Loading Loading @@ -3593,8 +3568,8 @@ public class LocalStore extends Store implements Serializable { if (part == null) { // If that fails, try and get a text part. part = MimeUtility.findFirstPartByMimeType(this, "text/plain"); if (part != null && part.getBody() instanceof LocalStore.LocalTextBody) { text = ((LocalStore.LocalTextBody) part.getBody()).getBodyForDisplay(); if (part != null && part.getBody() instanceof LocalTextBody) { text = ((LocalTextBody) part.getBody()).getBodyForDisplay(); } } else { // We successfully found an HTML part; do the necessary character set decoding. Loading Loading @@ -4028,32 +4003,6 @@ public class LocalStore extends Store implements Serializable { } } public static class LocalAttachmentBodyPart extends MimeBodyPart { private long mAttachmentId = -1; public LocalAttachmentBodyPart(Body body, long attachmentId) throws MessagingException { super(body); mAttachmentId = attachmentId; } /** * Returns the local attachment id of this body, or -1 if it is not stored. * @return */ public long getAttachmentId() { return mAttachmentId; } public void setAttachmentId(long attachmentId) { mAttachmentId = attachmentId; } @Override public String toString() { return "" + mAttachmentId; } } static class ThreadInfo { public final long threadId; public final long msgId; Loading
src/com/fsck/k9/mail/store/local/LocalTextBody.java 0 → 100644 +28 −0 Original line number Diff line number Diff line package com.fsck.k9.mail.store.local; import com.fsck.k9.mail.internet.TextBody; public class LocalTextBody extends TextBody { /** * This is an HTML-ified version of the message for display purposes. */ private String mBodyForDisplay; public LocalTextBody(String body) { super(body); } public LocalTextBody(String body, String bodyForDisplay) { super(body); this.mBodyForDisplay = bodyForDisplay; } public String getBodyForDisplay() { return mBodyForDisplay; } public void setBodyForDisplay(String mBodyForDisplay) { this.mBodyForDisplay = mBodyForDisplay; } }//LocalTextBody No newline at end of file
src/com/fsck/k9/view/AttachmentView.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeHeader; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.store.local.LocalStore.LocalAttachmentBodyPart; import com.fsck.k9.mail.store.local.LocalAttachmentBodyPart; import com.fsck.k9.provider.AttachmentProvider; public class AttachmentView extends FrameLayout implements OnClickListener, OnLongClickListener { Loading
src/com/fsck/k9/view/SingleMessageView.java +2 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Multipart; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.store.local.LocalStore; import com.fsck.k9.mail.store.local.LocalAttachmentBodyPart; import com.fsck.k9.mail.store.local.LocalStore.LocalMessage; import com.fsck.k9.provider.AttachmentProvider.AttachmentProviderColumns; Loading Loading @@ -626,7 +626,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener, for (int i = 0; i < mp.getCount(); i++) { renderAttachments(mp.getBodyPart(i), depth + 1, message, account, controller, listener); } } else if (part instanceof LocalStore.LocalAttachmentBodyPart) { } else if (part instanceof LocalAttachmentBodyPart) { AttachmentView view = (AttachmentView)mInflater.inflate(R.layout.message_view_attachment, null); view.setCallback(attachmentCallback); Loading