Merge "Delete attachment files when wiping Email data"

This commit is contained in:
Marc Blank 2010-12-10 15:31:19 -08:00 committed by Android (Google) Code Review
commit 3df4adc041

View File

@ -28,6 +28,7 @@ import com.android.email.mail.internet.MimeMessage;
import com.android.email.mail.internet.MimeUtility; import com.android.email.mail.internet.MimeUtility;
import com.android.email.provider.AttachmentProvider; import com.android.email.provider.AttachmentProvider;
import com.android.email.provider.EmailContent; import com.android.email.provider.EmailContent;
import com.android.email.provider.EmailProvider;
import com.android.email.provider.EmailContent.Account; import com.android.email.provider.EmailContent.Account;
import com.android.email.provider.EmailContent.AccountColumns; import com.android.email.provider.EmailContent.AccountColumns;
import com.android.email.provider.EmailContent.Attachment; import com.android.email.provider.EmailContent.Attachment;
@ -36,7 +37,6 @@ import com.android.email.provider.EmailContent.Mailbox;
import com.android.email.provider.EmailContent.Message; import com.android.email.provider.EmailContent.Message;
import com.android.email.provider.EmailContent.MessageColumns; import com.android.email.provider.EmailContent.MessageColumns;
import com.android.email.provider.EmailContent.SyncColumns; import com.android.email.provider.EmailContent.SyncColumns;
import com.android.email.provider.EmailProvider;
import com.android.email.service.MailService; import com.android.email.service.MailService;
import com.android.exchange.Eas; import com.android.exchange.Eas;
import com.android.exchange.EasSyncService; import com.android.exchange.EasSyncService;
@ -114,6 +114,8 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
Message.MAILBOX_KEY + "=" + mMailbox.mId, null); Message.MAILBOX_KEY + "=" + mMailbox.mId, null);
mContentResolver.delete(Message.UPDATED_CONTENT_URI, mContentResolver.delete(Message.UPDATED_CONTENT_URI,
Message.MAILBOX_KEY + "=" + mMailbox.mId, null); Message.MAILBOX_KEY + "=" + mMailbox.mId, null);
// Delete attachments...
AttachmentProvider.deleteAllMailboxAttachmentFiles(mContext, mAccount.mId, mMailbox.mId);
} }
private String getEmailFilter() { private String getEmailFilter() {