am 0d4681cd: Catch possible NPE in IMAP sync.

Merge commit '0d4681cd6606015fd242f148ec213a3256a81ec7' into eclair-plus-aosp

* commit '0d4681cd6606015fd242f148ec213a3256a81ec7':
  Catch possible NPE in IMAP sync.
This commit is contained in:
Andrew Stadler 2009-09-28 16:28:29 -07:00 committed by Android Git Automerger
commit 27bf596dfe

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] + "]");
}
}
}