1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-13 21:15:08 -05:00

Changed access to mParts in MimeMultipart so that it can be private too

This commit is contained in:
Tobias Baum 2014-09-22 21:54:02 +02:00
parent b6079d6460
commit 547eb74774
2 changed files with 12 additions and 13 deletions

View File

@ -13,7 +13,7 @@ import com.fsck.k9.mail.internet.TextBody;
public abstract class Multipart implements CompositeBody {
private Part mParent;
protected ArrayList<BodyPart> mParts = new ArrayList<BodyPart>();
private final ArrayList<BodyPart> mParts = new ArrayList<BodyPart>();
private String mContentType;

View File

@ -71,14 +71,12 @@ public class MimeMultipart extends Multipart {
writer.write("\r\n");
}
if (mParts.isEmpty()) {
if (getBodyParts().isEmpty()) {
writer.write("--");
writer.write(mBoundary);
writer.write("\r\n");
}
for (int i = 0, count = mParts.size(); i < count; i++) {
BodyPart bodyPart = mParts.get(i);
} else {
for (BodyPart bodyPart : getBodyParts()) {
writer.write("--");
writer.write(mBoundary);
writer.write("\r\n");
@ -86,6 +84,7 @@ public class MimeMultipart extends Multipart {
bodyPart.writeTo(out);
writer.write("\r\n");
}
}
writer.write("--");
writer.write(mBoundary);
@ -100,7 +99,7 @@ public class MimeMultipart extends Multipart {
@Override
public void setUsing7bitTransport() throws MessagingException {
for (BodyPart part : mParts) {
for (BodyPart part : getBodyParts()) {
part.setUsing7bitTransport();
}
}