mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-14 05:25:07 -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 {
|
public abstract class Multipart implements CompositeBody {
|
||||||
private Part mParent;
|
private Part mParent;
|
||||||
|
|
||||||
protected ArrayList<BodyPart> mParts = new ArrayList<BodyPart>();
|
private final ArrayList<BodyPart> mParts = new ArrayList<BodyPart>();
|
||||||
|
|
||||||
private String mContentType;
|
private String mContentType;
|
||||||
|
|
||||||
|
@ -71,20 +71,19 @@ public class MimeMultipart extends Multipart {
|
|||||||
writer.write("\r\n");
|
writer.write("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mParts.isEmpty()) {
|
if (getBodyParts().isEmpty()) {
|
||||||
writer.write("--");
|
writer.write("--");
|
||||||
writer.write(mBoundary);
|
writer.write(mBoundary);
|
||||||
writer.write("\r\n");
|
writer.write("\r\n");
|
||||||
}
|
} else {
|
||||||
|
for (BodyPart bodyPart : getBodyParts()) {
|
||||||
for (int i = 0, count = mParts.size(); i < count; i++) {
|
writer.write("--");
|
||||||
BodyPart bodyPart = mParts.get(i);
|
writer.write(mBoundary);
|
||||||
writer.write("--");
|
writer.write("\r\n");
|
||||||
writer.write(mBoundary);
|
writer.flush();
|
||||||
writer.write("\r\n");
|
bodyPart.writeTo(out);
|
||||||
writer.flush();
|
writer.write("\r\n");
|
||||||
bodyPart.writeTo(out);
|
}
|
||||||
writer.write("\r\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.write("--");
|
writer.write("--");
|
||||||
@ -100,7 +99,7 @@ public class MimeMultipart extends Multipart {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUsing7bitTransport() throws MessagingException {
|
public void setUsing7bitTransport() throws MessagingException {
|
||||||
for (BodyPart part : mParts) {
|
for (BodyPart part : getBodyParts()) {
|
||||||
part.setUsing7bitTransport();
|
part.setUsing7bitTransport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user