mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Changed access to mParts in MimeMultipart so that it can be private too
This commit is contained in:
parent
b6079d6460
commit
547eb74774
@ -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;
|
||||
|
||||
|
@ -71,20 +71,19 @@ 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);
|
||||
writer.write("--");
|
||||
writer.write(mBoundary);
|
||||
writer.write("\r\n");
|
||||
writer.flush();
|
||||
bodyPart.writeTo(out);
|
||||
writer.write("\r\n");
|
||||
} else {
|
||||
for (BodyPart bodyPart : getBodyParts()) {
|
||||
writer.write("--");
|
||||
writer.write(mBoundary);
|
||||
writer.write("\r\n");
|
||||
writer.flush();
|
||||
bodyPart.writeTo(out);
|
||||
writer.write("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
writer.write("--");
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user