Merge "Fix NPE when trying to open attachments" into honeycomb-mr1
This commit is contained in:
commit
19829ef7ed
@ -868,8 +868,11 @@ public class Controller {
|
|||||||
*/
|
*/
|
||||||
public void loadAttachment(final long attachmentId, final long messageId,
|
public void loadAttachment(final long attachmentId, final long messageId,
|
||||||
final long accountId) {
|
final long accountId) {
|
||||||
|
|
||||||
Attachment attachInfo = Attachment.restoreAttachmentWithId(mProviderContext, attachmentId);
|
Attachment attachInfo = Attachment.restoreAttachmentWithId(mProviderContext, attachmentId);
|
||||||
|
if (attachInfo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Utility.attachmentExists(mProviderContext, attachInfo)) {
|
if (Utility.attachmentExists(mProviderContext, attachInfo)) {
|
||||||
// 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
|
||||||
// This presumably is for POP3 messages
|
// This presumably is for POP3 messages
|
||||||
|
Loading…
Reference in New Issue
Block a user