am aba60dfb: Merge "DO NOT MERGE - Fix NPE when trying to open attachments" into gingerbread

* commit 'aba60dfb73f2e1c8406f64ba04f42d4d9a29dd1f':
  DO NOT MERGE - Fix NPE when trying to open attachments
This commit is contained in:
Andy Stadler 2011-03-30 09:31:02 -07:00 committed by Android Git Automerger
commit 3f8c081d2b

View File

@ -746,6 +746,9 @@ public class Controller {
File saveToFile = AttachmentProvider.getAttachmentFilename(mProviderContext,
accountId, attachmentId);
Attachment attachInfo = Attachment.restoreAttachmentWithId(mProviderContext, attachmentId);
if (attachInfo == null) {
return;
}
if (saveToFile.exists() && attachInfo.mContentUri != null) {
// The attachment has already been downloaded, so we will just "pretend" to download it