Lines Matching refs:Attachment
21 import com.android.emailcommon.provider.EmailContent.Attachment;
45 Attachment.FLAG_POLICY_DISALLOWS_DOWNLOAD + ")!=0";
116 private Attachment setupSimpleAttachment(String name, long size, Account acct) {
117 Attachment att = ProviderTestUtils.setupAttachment(-1, name, size, false, mMockContext);
129 ArrayList<Attachment> atts = new ArrayList<Attachment>();
130 Attachment att1 = setupSimpleAttachment("fileName1", 10001L, acct);
132 Attachment att2 = setupSimpleAttachment("fileName2", 20001L, acct);
139 Attachment att3 = setupSimpleAttachment("fileName3", 70001L, acct);
141 Attachment att4 = setupSimpleAttachment("fileName4", 5001L, acct);
146 assertEquals(4, EmailContent.count(mMockContext, Attachment.CONTENT_URI));
148 assertEquals(0, EmailContent.count(mMockContext, Attachment.CONTENT_URI,
153 assertEquals(4, EmailContent.count(mMockContext, Attachment.CONTENT_URI,
161 assertEquals(2, EmailContent.count(mMockContext, Attachment.CONTENT_URI,
164 att2 = Attachment.restoreAttachmentWithId(mMockContext, att2.mId);
165 assertTrue((att2.mFlags & Attachment.FLAG_POLICY_DISALLOWS_DOWNLOAD) != 0);
166 att3 = Attachment.restoreAttachmentWithId(mMockContext, att3.mId);
167 assertTrue((att3.mFlags & Attachment.FLAG_POLICY_DISALLOWS_DOWNLOAD) != 0);
174 assertEquals(3, EmailContent.count(mMockContext, Attachment.CONTENT_URI,
177 att4 = Attachment.restoreAttachmentWithId(mMockContext, att4.mId);
178 assertTrue((att4.mFlags & Attachment.FLAG_POLICY_DISALLOWS_DOWNLOAD) == 0);
184 assertEquals(0, EmailContent.count(mMockContext, Attachment.CONTENT_URI,