Lines Matching refs:EmailContent
42 import com.android.emailcommon.provider.EmailContent;
43 import com.android.emailcommon.provider.EmailContent.AccountColumns;
44 import com.android.emailcommon.provider.EmailContent.Attachment;
45 import com.android.emailcommon.provider.EmailContent.AttachmentColumns;
46 import com.android.emailcommon.provider.EmailContent.Body;
47 import com.android.emailcommon.provider.EmailContent.BodyColumns;
48 import com.android.emailcommon.provider.EmailContent.MailboxColumns;
49 import com.android.emailcommon.provider.EmailContent.Message;
50 import com.android.emailcommon.provider.EmailContent.MessageColumns;
51 import com.android.emailcommon.provider.EmailContent.PolicyColumns;
82 super(EmailProvider.class, EmailContent.AUTHORITY);
391 EmailContent.RECORD_ID + "=?",
414 EmailContent.Body.CONTENT_URI,
415 EmailContent.Body.CONTENT_PROJECTION,
416 EmailContent.Body.MESSAGE_KEY + "=?",
421 return c.moveToFirst() ? EmailContent.getContent(c, Body.class) : null;
443 Message message1get = EmailContent.Message.restoreMessageWithId(mMockContext, message1Id);
463 Message message2get = EmailContent.Message.restoreMessageWithId(mMockContext, message2Id);
514 Attachment actual = EmailContent.getContent(c, Attachment.class);
564 Attachment actual = EmailContent.getContent(c, Attachment.class);
572 // test EmailContent.restoreAttachmentsWitdMessageId()
635 int numBoxes = EmailContent.count(mMockContext, Account.CONTENT_URI, null, null);
643 numBoxes = EmailContent.count(mMockContext, Account.CONTENT_URI, null, null);
651 numBoxes = EmailContent.count(mMockContext, Account.CONTENT_URI, null, null);
855 * Note that we can't use EmailContent.count() here because it uses a projection including
860 Cursor c = context.getContentResolver().query(uri, EmailContent.ID_PROJECTION, selection,
891 assertEquals(1, count(mMockContext, EmailContent.uriWithLimit(Message.CONTENT_URI, 1),
893 assertEquals(3, count(mMockContext, EmailContent.uriWithLimit(Message.CONTENT_URI, 3),
895 assertEquals(8, count(mMockContext, EmailContent.uriWithLimit(Message.CONTENT_URI, 100),
903 EmailContent.uriWithLimit(Message.CONTENT_URI, 1),
955 assertEquals(4, EmailContent.count(context, Message.DELETED_CONTENT_URI, null, null));
970 assertEquals(4, EmailContent.count(context, Message.UPDATED_CONTENT_URI, null, null));
993 cv.put(EmailContent.RECORD_ID, msgId++);
999 cv.put(EmailContent.RECORD_ID, msgId++);
1005 cv.put(EmailContent.RECORD_ID, msgId++);
1011 cv.put(EmailContent.RECORD_ID, msgId++);
1017 assertEquals(6, EmailContent.count(context, Message.UPDATED_CONTENT_URI, null, null));
1018 assertEquals(6, EmailContent.count(context, Message.DELETED_CONTENT_URI, null, null));
1027 assertEquals(4, EmailContent.count(context, Message.UPDATED_CONTENT_URI, null, null));
1028 assertEquals(4, EmailContent.count(context, Message.DELETED_CONTENT_URI, null, null));
1048 String selection = EmailContent.MessageColumns.ACCOUNT_KEY + "=? AND " +
1049 EmailContent.MessageColumns.MAILBOX_KEY + "=?";
1053 int numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1061 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1069 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1091 String selection = EmailContent.MessageColumns.ACCOUNT_KEY + "=? AND "
1092 + EmailContent.MessageColumns.MAILBOX_KEY + "=?";
1098 int numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1102 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1111 numMessages = EmailContent
1115 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1124 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1128 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1151 String selection = EmailContent.MessageColumns.ACCOUNT_KEY + "=? AND "
1152 + EmailContent.MessageColumns.MAILBOX_KEY + "=?";
1158 int numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1168 numMessages = EmailContent.count(mMockContext, Message.UPDATED_CONTENT_URI, selection,
1183 numMessages = EmailContent.count(mMockContext, Message.UPDATED_CONTENT_URI, selection,
1197 Message originalMessage = EmailContent.getContent(c, Message.class);
1210 numMessages = EmailContent.count(mMockContext, Message.UPDATED_CONTENT_URI, selection,
1215 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1239 int numAccounts = EmailContent.count(mMockContext, Account.CONTENT_URI, null, null);
1241 int numBoxes = EmailContent.count(mMockContext, Mailbox.CONTENT_URI, null, null);
1243 int numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1251 numAccounts = EmailContent.count(mMockContext, Account.CONTENT_URI, null, null);
1253 numBoxes = EmailContent.count(mMockContext, Mailbox.CONTENT_URI, null, null);
1255 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1282 String selection = EmailContent.MessageColumns.ACCOUNT_KEY + "=? AND " +
1283 EmailContent.MessageColumns.MAILBOX_KEY + "=?";
1287 int numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1306 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1308 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1311 numMessages = EmailContent.count(mMockContext, Message.UPDATED_CONTENT_URI, selection,
1320 numMessages = EmailContent.count(mMockContext, Message.CONTENT_URI, selection, selArgs);
1322 numMessages = EmailContent.count(mMockContext, Message.DELETED_CONTENT_URI, selection,
1325 numMessages = EmailContent.count(mMockContext, Message.UPDATED_CONTENT_URI, selection,
1371 int numBodies = EmailContent.count(mMockContext, Body.CONTENT_URI, bodySelection, selArgs);
1375 int numAttachments = EmailContent.count(mMockContext, Attachment.CONTENT_URI,
1384 numBodies = EmailContent.count(mMockContext, Body.CONTENT_URI, bodySelection, selArgs);
1387 numAttachments = EmailContent.count(mMockContext, Attachment.CONTENT_URI,
1396 numBodies = EmailContent.count(mMockContext, Body.CONTENT_URI, bodySelection, selArgs);
1399 numAttachments = EmailContent.count(mMockContext, Attachment.CONTENT_URI,
1449 * Test retrieving attachments by message ID (using EmailContent.Attachment.MESSAGE_ID_URI)
1468 Attachment a1Get = EmailContent.getContent(c, Attachment.class);
1471 Attachment a2Get = EmailContent.getContent(c, Attachment.class);
1479 * Test deleting attachments by message ID (using EmailContent.Attachment.MESSAGE_ID_URI)
1502 Attachment a3Get = EmailContent.getContent(c, Attachment.class);
1505 Attachment a4Get = EmailContent.getContent(c, Attachment.class);
1712 int count = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1715 count = EmailContent.count(mMockContext, Body.CONTENT_URI, null, null);
1749 count = EmailContent.count(mMockContext, Body.CONTENT_URI, null, null);
1753 count = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1772 int count = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1775 count = EmailContent.count(mMockContext, Body.CONTENT_URI, null, null);
1809 count = EmailContent.count(mMockContext, Message.CONTENT_URI, null, null);
1813 count = EmailContent.count(mMockContext, Body.CONTENT_URI, null, null);
1963 EmailContent.ID_SELECTION, new String[] {Long.toString(a2.mId)});
1972 EmailContent.ID_SELECTION, new String[] {Long.toString(a3.mId)});
1999 cv.put(EmailContent.FIELD_COLUMN_NAME, AccountColumns.NEW_MESSAGE_COUNT);
2000 cv.put(EmailContent.ADD_COLUMN_NAME, 1);
2051 Uri uri = Uri.parse("content://" + EmailContent.AUTHORITY + "/fooble");
2068 cr.query(uri, EmailContent.ID_PROJECTION, null, null, null);
2072 uri = Uri.parse("content://" + EmailContent.AUTHORITY + "/mailbox/fred");
2074 cr.query(uri, EmailContent.ID_PROJECTION, null, null, null);
2078 uri = Uri.parse("content://" + EmailContent.AUTHORITY + "/mailbox/-1");
2079 Cursor c = cr.query(uri, EmailContent.ID_PROJECTION, null, null, null);
2398 EmailContent.delete(mMockContext, Account.CONTENT_URI, b.mId);