Merge "DO NOT MERGE - Fix NPE when trying to open attachments" into gingerbread
This commit is contained in:
commit
aba60dfb73
@ -746,6 +746,9 @@ public class Controller {
|
|||||||
File saveToFile = AttachmentProvider.getAttachmentFilename(mProviderContext,
|
File saveToFile = AttachmentProvider.getAttachmentFilename(mProviderContext,
|
||||||
accountId, attachmentId);
|
accountId, attachmentId);
|
||||||
Attachment attachInfo = Attachment.restoreAttachmentWithId(mProviderContext, attachmentId);
|
Attachment attachInfo = Attachment.restoreAttachmentWithId(mProviderContext, attachmentId);
|
||||||
|
if (attachInfo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (saveToFile.exists() && attachInfo.mContentUri != null) {
|
if (saveToFile.exists() && attachInfo.mContentUri != null) {
|
||||||
// The attachment has already been downloaded, so we will just "pretend" to download it
|
// The attachment has already been downloaded, so we will just "pretend" to download it
|
||||||
|
Loading…
Reference in New Issue
Block a user