Loading src/com/fsck/k9/mail/Message.java +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public abstract class Message implements Part, CompositeBody { } return false; } @Override public boolean equals(Object o) { if (o == null || !(o instanceof Message)) { Loading Loading @@ -144,6 +145,8 @@ public abstract class Message implements Part, CompositeBody { public abstract String getPreview(); public abstract boolean hasAttachments(); public abstract int getSize(); /* * calculateContentPreview * Takes a plain text message body as a string. Loading src/com/fsck/k9/mail/Part.java +1 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ public interface Part { public String[] getHeader(String name) throws MessagingException; public int getSize(); public boolean isMimeType(String mimeType) throws MessagingException; public String getMimeType() throws MessagingException; Loading @@ -42,5 +40,6 @@ public interface Part { * @throws MessagingException * */ //TODO perhaps it would be clearer to use a flag "force7bit" in writeTo public abstract void setUsing7bitTransport() throws MessagingException; } src/com/fsck/k9/mail/internet/MimeBodyPart.java +1 −6 Original line number Diff line number Diff line Loading @@ -20,9 +20,8 @@ import org.apache.james.mime4j.util.MimeUtil; * Message. */ public class MimeBodyPart extends BodyPart { protected MimeHeader mHeader = new MimeHeader(); protected final MimeHeader mHeader = new MimeHeader(); protected Body mBody; protected int mSize; public MimeBodyPart() throws MessagingException { this(null); Loading Loading @@ -125,10 +124,6 @@ public class MimeBodyPart extends BodyPart { return getMimeType().equalsIgnoreCase(mimeType); } public int getSize() { return mSize; } /** * Write the MimeMessage out in MIME format. */ Loading src/com/fsck/k9/mail/store/ImapStore.java +1 −20 Original line number Diff line number Diff line Loading @@ -1834,7 +1834,7 @@ public class ImapStore extends Store { * For each part in the message we're going to add a new BodyPart and parse * into it. */ ImapBodyPart bp = new ImapBodyPart(); MimeBodyPart bp = new MimeBodyPart(); if (id.equalsIgnoreCase("TEXT")) { parseBodyStructure(bs.getList(i), bp, Integer.toString(i + 1)); } else { Loading Loading @@ -1970,10 +1970,6 @@ public class ImapStore extends Store { if (part instanceof ImapMessage) { ((ImapMessage) part).setSize(size); } else if (part instanceof ImapBodyPart) { ((ImapBodyPart) part).setSize(size); } else { throw new MessagingException("Unknown part type " + part.toString()); } part.setHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA, id); } Loading Loading @@ -2931,11 +2927,6 @@ public class ImapStore extends Store { this.mSize = size; } @Override public void parse(InputStream in) throws IOException, MessagingException { super.parse(in); } public void setFlagInternal(Flag flag, boolean set) throws MessagingException { super.setFlag(flag, set); } Loading @@ -2953,16 +2944,6 @@ public class ImapStore extends Store { } } static class ImapBodyPart extends MimeBodyPart { public ImapBodyPart() throws MessagingException { super(); } public void setSize(int size) { this.mSize = size; } } static class ImapException extends MessagingException { private static final long serialVersionUID = 3725007182205882394L; String mAlertText; Loading Loading
src/com/fsck/k9/mail/Message.java +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public abstract class Message implements Part, CompositeBody { } return false; } @Override public boolean equals(Object o) { if (o == null || !(o instanceof Message)) { Loading Loading @@ -144,6 +145,8 @@ public abstract class Message implements Part, CompositeBody { public abstract String getPreview(); public abstract boolean hasAttachments(); public abstract int getSize(); /* * calculateContentPreview * Takes a plain text message body as a string. Loading
src/com/fsck/k9/mail/Part.java +1 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ public interface Part { public String[] getHeader(String name) throws MessagingException; public int getSize(); public boolean isMimeType(String mimeType) throws MessagingException; public String getMimeType() throws MessagingException; Loading @@ -42,5 +40,6 @@ public interface Part { * @throws MessagingException * */ //TODO perhaps it would be clearer to use a flag "force7bit" in writeTo public abstract void setUsing7bitTransport() throws MessagingException; }
src/com/fsck/k9/mail/internet/MimeBodyPart.java +1 −6 Original line number Diff line number Diff line Loading @@ -20,9 +20,8 @@ import org.apache.james.mime4j.util.MimeUtil; * Message. */ public class MimeBodyPart extends BodyPart { protected MimeHeader mHeader = new MimeHeader(); protected final MimeHeader mHeader = new MimeHeader(); protected Body mBody; protected int mSize; public MimeBodyPart() throws MessagingException { this(null); Loading Loading @@ -125,10 +124,6 @@ public class MimeBodyPart extends BodyPart { return getMimeType().equalsIgnoreCase(mimeType); } public int getSize() { return mSize; } /** * Write the MimeMessage out in MIME format. */ Loading
src/com/fsck/k9/mail/store/ImapStore.java +1 −20 Original line number Diff line number Diff line Loading @@ -1834,7 +1834,7 @@ public class ImapStore extends Store { * For each part in the message we're going to add a new BodyPart and parse * into it. */ ImapBodyPart bp = new ImapBodyPart(); MimeBodyPart bp = new MimeBodyPart(); if (id.equalsIgnoreCase("TEXT")) { parseBodyStructure(bs.getList(i), bp, Integer.toString(i + 1)); } else { Loading Loading @@ -1970,10 +1970,6 @@ public class ImapStore extends Store { if (part instanceof ImapMessage) { ((ImapMessage) part).setSize(size); } else if (part instanceof ImapBodyPart) { ((ImapBodyPart) part).setSize(size); } else { throw new MessagingException("Unknown part type " + part.toString()); } part.setHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA, id); } Loading Loading @@ -2931,11 +2927,6 @@ public class ImapStore extends Store { this.mSize = size; } @Override public void parse(InputStream in) throws IOException, MessagingException { super.parse(in); } public void setFlagInternal(Flag flag, boolean set) throws MessagingException { super.setFlag(flag, set); } Loading @@ -2953,16 +2944,6 @@ public class ImapStore extends Store { } } static class ImapBodyPart extends MimeBodyPart { public ImapBodyPart() throws MessagingException { super(); } public void setSize(int size) { this.mSize = size; } } static class ImapException extends MessagingException { private static final long serialVersionUID = 3725007182205882394L; String mAlertText; Loading