am 27bf596d: am 0d4681cd: Catch possible NPE in IMAP sync.

Merge commit '27bf596dfe24911b1bebf08e69f37237fdcb04cf'

* commit '27bf596dfe24911b1bebf08e69f37237fdcb04cf':
  Catch possible NPE in IMAP sync.
This commit is contained in:
Andrew Stadler 2009-09-29 11:11:56 -07:00 committed by Android Git Automerger
commit 366b5912f8

View File

@ -679,8 +679,11 @@ public class ImapStore extends Store {
for (Object o : fp) {
if (o instanceof Part) {
Part part = (Part) o;
String partId = part.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA)[0];
fetchFields.add("BODY.PEEK[" + partId + "]");
String[] partIds =
part.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA);
if (partIds != null) {
fetchFields.add("BODY.PEEK[" + partIds[0] + "]");
}
}
}