am 0a7d214b
: Merge "Delete attachment if there\'s no corresponding message" into honeycomb
* commit '0a7d214b27ff9a7ef2c1aa9348c65c7959db6dcb': Delete attachment if there's no corresponding message
This commit is contained in:
commit
4fad1dd6a3
@ -1630,6 +1630,10 @@ public class Controller {
|
|||||||
LegacyListener legacyListener = sInstance.mLegacyListener;
|
LegacyListener legacyListener = sInstance.mLegacyListener;
|
||||||
legacyController.loadAttachment(msg.mAccountKey, msg.mId, msg.mMailboxKey,
|
legacyController.loadAttachment(msg.mAccountKey, msg.mId, msg.mMailboxKey,
|
||||||
attachmentId, legacyListener);
|
attachmentId, legacyListener);
|
||||||
|
} else {
|
||||||
|
// Send back the specific error status for this case
|
||||||
|
sInstance.mCallbackProxy.loadAttachmentStatus(att.mMessageKey, attachmentId,
|
||||||
|
EmailServiceStatus.MESSAGE_NOT_FOUND, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,7 +528,10 @@ public class AttachmentDownloadService extends Service implements Runnable {
|
|||||||
MailService.actionSendPendingMail(mContext, req.accountId);
|
MailService.actionSendPendingMail(mContext, req.accountId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!deleted) {
|
if (statusCode == EmailServiceStatus.MESSAGE_NOT_FOUND) {
|
||||||
|
// If there's no associated message, delete the attachment
|
||||||
|
EmailContent.delete(mContext, Attachment.CONTENT_URI, attachment.mId);
|
||||||
|
} else if (!deleted) {
|
||||||
// Clear the download flags, since we're done for now. Note that this happens
|
// Clear the download flags, since we're done for now. Note that this happens
|
||||||
// only for non-recoverable errors. When these occur for forwarded mail, we can
|
// only for non-recoverable errors. When these occur for forwarded mail, we can
|
||||||
// ignore it and continue; otherwise, it was either 1) a user request, in which
|
// ignore it and continue; otherwise, it was either 1) a user request, in which
|
||||||
|
Loading…
Reference in New Issue
Block a user