Home
last modified time | relevance | path

Searched refs:Mailbox (Results 1 – 25 of 41) sorted by relevance

12

/packages/apps/Email/tests/src/com/android/emailcommon/provider/
DMailboxTests.java75 ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailboxId), in getMessageCount()
80 private static Message createMessage(Context c, Mailbox b, boolean starred, boolean read, in createMessage()
101 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, c); in testSave()
104 Mailbox box2 = Mailbox.restoreMailboxWithId(c, box1Id); in testSave()
117 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, c); in testDelete()
119 Mailbox box2 = ProviderTestUtils.setupMailbox("box2", account1Id, true, c); in testDelete()
126 int numBoxes = EmailContent.count(c, Mailbox.CONTENT_URI, selection, selArgs); in testDelete()
130 Uri uri = ContentUris.withAppendedId(Mailbox.CONTENT_URI, box1Id); in testDelete()
134 numBoxes = EmailContent.count(c, Mailbox.CONTENT_URI, selection, selArgs); in testDelete()
138 uri = ContentUris.withAppendedId(Mailbox.CONTENT_URI, box2Id); in testDelete()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DMailboxUtilities.java39 Mailbox.PARENT_KEY_UNINITIALIZED + ")";
55 long parentId = parentCursor.getLong(Mailbox.CONTENT_ID_COLUMN); in setFlagsAndChildrensParentKey()
57 int parentType = parentCursor.getInt(Mailbox.CONTENT_TYPE_COLUMN); in setFlagsAndChildrensParentKey()
58 String parentServerId = parentCursor.getString(Mailbox.CONTENT_SERVER_ID_COLUMN); in setFlagsAndChildrensParentKey()
60 if (parentType <= Mailbox.TYPE_NOT_EMAIL) { in setFlagsAndChildrensParentKey()
61 parentFlags |= Mailbox.FLAG_HOLDS_MAIL + Mailbox.FLAG_SUPPORTS_SETTINGS; in setFlagsAndChildrensParentKey()
64 if (parentType == Mailbox.TYPE_MAIL || parentType == Mailbox.TYPE_TRASH || in setFlagsAndChildrensParentKey()
65 parentType == Mailbox.TYPE_JUNK || parentType == Mailbox.TYPE_INBOX) { in setFlagsAndChildrensParentKey()
66 parentFlags |= Mailbox.FLAG_ACCEPTS_MOVED_MAIL; in setFlagsAndChildrensParentKey()
74 Cursor childCursor = resolver.query(Mailbox.CONTENT_URI, in setFlagsAndChildrensParentKey()
[all …]
DMailbox.java44 public class Mailbox extends EmailContent implements EmailContent.MailboxColumns, Parcelable { class
294 + MailboxColumns.TYPE + "=" + Mailbox.TYPE_OUTBOX + " or "
413 public Mailbox() { in Mailbox() method in Mailbox
420 case Mailbox.TYPE_INBOX: in getSystemMailboxName()
423 case Mailbox.TYPE_OUTBOX: in getSystemMailboxName()
426 case Mailbox.TYPE_DRAFTS: in getSystemMailboxName()
429 case Mailbox.TYPE_TRASH: in getSystemMailboxName()
432 case Mailbox.TYPE_SENT: in getSystemMailboxName()
435 case Mailbox.TYPE_JUNK: in getSystemMailboxName()
438 case Mailbox.TYPE_STARRED: in getSystemMailboxName()
[all …]
DEmailContent.java189 Mailbox.initMailbox(); in init()
836 + "SELECT " + MailboxColumns._ID + " FROM " + Mailbox.TABLE_NAME + ""
837 + " WHERE " + MailboxColumns.TYPE + " = " + Mailbox.TYPE_TRASH
844 + "SELECT " + MailboxColumns._ID + " FROM " + Mailbox.TABLE_NAME
845 + " WHERE " + MailboxColumns.TYPE + " = " + Mailbox.TYPE_INBOX
852 + "SELECT " + MailboxColumns._ID + " FROM " + Mailbox.TABLE_NAME
853 + " WHERE " + MailboxColumns.TYPE + " = " + Mailbox.TYPE_DRAFTS
860 + "SELECT " + MailboxColumns._ID + " FROM " + Mailbox.TABLE_NAME
861 + " WHERE " + MailboxColumns.TYPE + " = " + Mailbox.TYPE_OUTBOX
1245 if (mailboxId == Mailbox.QUERY_ALL_INBOXES) { in buildMessageListSelection()
[all …]
/packages/apps/Email/provider_src/com/android/email/provider/
DDBHelper.java53 import com.android.emailcommon.provider.Mailbox;
82 "create trigger mailbox_delete before delete on " + Mailbox.TABLE_NAME +
94 " begin delete from " + Mailbox.TABLE_NAME +
217 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT + in createMessageCountTriggers()
225 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT + in createMessageCountTriggers()
233 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT + in createMessageCountTriggers()
236 "; update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT + in createMessageCountTriggers()
279 + "(select " + MailboxColumns.TYPE + " from " + Mailbox.TABLE_NAME in createDeleteDuplicateMessagesTrigger()
281 + MessageColumns.MAILBOX_KEY + ")!=" + Mailbox.TYPE_SEARCH in createDeleteDuplicateMessagesTrigger()
293 + " and (select " + Mailbox.TABLE_NAME + "." + MailboxColumns.TYPE + " from " in createDeleteDuplicateMessagesTrigger()
[all …]
DEmailProvider.java96 import com.android.emailcommon.provider.Mailbox;
296 array.put(MAILBOX_BASE >> BASE_SHIFT, Mailbox.TABLE_NAME);
457 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.PARENT_KEY + "=" in fixParentKeys()
458 + "(select " + Mailbox._ID + " from " + Mailbox.TABLE_NAME + " as b where " in fixParentKeys()
459 + Mailbox.TABLE_NAME + "." + MailboxColumns.PARENT_SERVER_ID + "=" in fixParentKeys()
461 + Mailbox.TABLE_NAME + "." + MailboxColumns.PARENT_SERVER_ID + " not null and " in fixParentKeys()
462 + Mailbox.TABLE_NAME + "." + MailboxColumns.ACCOUNT_KEY in fixParentKeys()
463 + "=b." + Mailbox.ACCOUNT_KEY + ")"); in fixParentKeys()
469 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.PARENT_KEY in fixParentKeys()
470 + "=" + Mailbox.NO_MAILBOX + " where " + MailboxColumns.PARENT_KEY in fixParentKeys()
[all …]
DFolderPickerActivity.java34 import com.android.emailcommon.provider.Mailbox;
75 mMailboxType = i.getIntExtra(MAILBOX_TYPE_EXTRA, Mailbox.TYPE_TRASH); in onCreate()
76 long trashMailboxId = Mailbox.findMailboxOfType(this, mAccountId, Mailbox.TYPE_TRASH); in onCreate()
78 if (trashMailboxId != Mailbox.NO_MAILBOX && mInSetup) { in onCreate()
188 Mailbox ofType = Mailbox.restoreMailboxOfType(this, mAccountId, mMailboxType); in select()
190 values.put(MailboxColumns.TYPE, Mailbox.TYPE_MAIL); in select()
192 ContentUris.withAppendedId(Mailbox.CONTENT_URI, ofType.mId), values, in select()
197 Mailbox mailbox = Mailbox.restoreMailboxWithId(this, id); in select()
201 ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailbox.mId), values, in select()
DEmailConversationCursor.java34 import com.android.emailcommon.provider.Mailbox;
70 Mailbox mailbox = Mailbox.restoreMailboxWithId(context, mailboxId); in EmailConversationCursor()
84 && (Mailbox.isSyncableType(mailbox.mType) in EmailConversationCursor()
85 || mailbox.mType == Mailbox.TYPE_SEARCH) in EmailConversationCursor()
130 Mailbox mailbox = Mailbox.restoreMailboxWithId(mContext, mMailboxId); in respond()
199 if (mMailboxTypeId == Mailbox.TYPE_DRAFTS) { in generateConversationInfo()
202 } else if (mMailboxTypeId == Mailbox.TYPE_SENT || in generateConversationInfo()
203 mMailboxTypeId == Mailbox.TYPE_OUTBOX) { in generateConversationInfo()
DWidgetProvider.java26 import com.android.emailcommon.provider.Mailbox;
95 if (accountId == Account.NO_ACCOUNT || mailboxId == Mailbox.NO_MAILBOX) { in migrateLegacyWidgetInformation()
134 if (mailboxId == Mailbox.QUERY_ALL_INBOXES) { in migrateLegacyWidgetMailboxId()
135 return EmailProvider.getVirtualMailboxId(accountId, Mailbox.TYPE_INBOX); in migrateLegacyWidgetMailboxId()
136 } else if (mailboxId == Mailbox.QUERY_ALL_UNREAD) { in migrateLegacyWidgetMailboxId()
137 return EmailProvider.getVirtualMailboxId(accountId, Mailbox.TYPE_UNREAD); in migrateLegacyWidgetMailboxId()
188 long mailboxId = prefs.getLong(LEGACY_MAILBOX_ID_PREFIX + appWidgetId, Mailbox.NO_MAILBOX); in loadMailboxIdPref()
/packages/apps/Email/tests/src/com/android/email/
DControllerProviderOpsTests.java26 import com.android.emailcommon.provider.Mailbox;
68 Mailbox.getSystemMailboxName(mContext, -1); in testGetMailboxServerName()
74 assertEquals("Inbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_INBOX)); in testGetMailboxServerName()
75 assertEquals("Outbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_OUTBOX)); in testGetMailboxServerName()
76 assertEquals("Trash", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_TRASH)); in testGetMailboxServerName()
77 assertEquals("Sent", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_SENT)); in testGetMailboxServerName()
78 assertEquals("Junk", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_JUNK)); in testGetMailboxServerName()
83 assertEquals("Inbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_INBOX)); in testGetMailboxServerName()
84 assertEquals("Outbox", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_OUTBOX)); in testGetMailboxServerName()
85 assertEquals("Trash", Mailbox.getSystemMailboxName(mContext, Mailbox.TYPE_TRASH)); in testGetMailboxServerName()
[all …]
DSecurityPolicyTests.java33 import com.android.emailcommon.provider.Mailbox;
398 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, mMockContext); in testWipeExpiringAccounts()
402 Mailbox box2 = ProviderTestUtils.setupMailbox("box2", account2Id, true, mMockContext); in testWipeExpiringAccounts()
412 assertEquals(2, EmailContent.count(mMockContext, Mailbox.CONTENT_URI)); in testWipeExpiringAccounts()
423 Mailbox box3 = ProviderTestUtils.setupMailbox("box3", account3Id, true, mMockContext); in testWipeExpiringAccounts()
430 assertEquals(3, EmailContent.count(mMockContext, Mailbox.CONTENT_URI)); in testWipeExpiringAccounts()
438 assertEquals(2, EmailContent.count(mMockContext, Mailbox.CONTENT_URI)); in testWipeExpiringAccounts()
/packages/apps/Email/provider_src/com/android/email/service/
DEmailServiceStub.java54 import com.android.emailcommon.provider.Mailbox;
100 final Mailbox mailbox = Mailbox.restoreMailboxWithId(mContext, mailboxId); in requestSync()
108 final Bundle extras = Mailbox.createSyncBundle(mailboxId); in requestSync()
115 extras.putInt(Mailbox.SYNC_EXTRA_DELTA_MESSAGE_COUNT, deltaMessageCount); in requestSync()
158 Mailbox mailbox = Mailbox.restoreMailboxWithId(mContext, message.mMailboxKey); in loadAttachment()
163 if (mailbox.mType == Mailbox.TYPE_OUTBOX) { in loadAttachment()
172 mailbox = Mailbox.restoreMailboxWithId(mContext, sourceMsg.mMailboxKey); in loadAttachment()
176 } else if (mailbox.mType == Mailbox.TYPE_SEARCH && message.mMainMailboxKey != 0) { in loadAttachment()
177 mailbox = Mailbox.restoreMailboxWithId(mContext, message.mMainMailboxKey); in loadAttachment()
299 for (final int type : Mailbox.REQUIRED_FOLDER_TYPES) { in updateFolderList()
[all …]
DImapService.java59 import com.android.emailcommon.provider.Mailbox;
97 private static Mailbox mLastSearchRemoteMailbox = null;
165 final Account account, final Mailbox folder, final boolean loadMore, in synchronizeMailboxSynchronous()
255 Folder remoteFolder, ArrayList<Message> messages, final Mailbox toMailbox) in loadUnsyncedMessages()
282 final Mailbox mailbox, Folder remoteFolder, ArrayList<Message> unsyncedMessages, in downloadFlagAndEnvelope()
363 final Account account, Store remoteStore, final Mailbox mailbox, final boolean loadMore, in synchronizeMailboxGeneric()
375 if (mailbox.mType == Mailbox.TYPE_DRAFTS || mailbox.mType == Mailbox.TYPE_OUTBOX) { in synchronizeMailboxGeneric()
446 if (mailbox.mType == Mailbox.TYPE_TRASH || mailbox.mType == Mailbox.TYPE_SENT) { in synchronizeMailboxGeneric()
780 private static Mailbox getRemoteMailboxForMessage( in getRemoteMailboxForMessage()
790 Cursor c = context.getContentResolver().query(Mailbox.CONTENT_URI, in getRemoteMailboxForMessage()
[all …]
DPopImapSyncAdapterService.java41 import com.android.emailcommon.provider.Mailbox;
85 private static boolean loadsFromServer(Context context, Mailbox m, String protocol) { in loadsFromServer()
91 return m.mType != Mailbox.TYPE_DRAFTS in loadsFromServer()
92 && m.mType != Mailbox.TYPE_OUTBOX in loadsFromServer()
93 && m.mType != Mailbox.TYPE_SEARCH; in loadsFromServer()
96 return Mailbox.TYPE_INBOX == m.mType; in loadsFromServer()
106 Mailbox mailbox = Mailbox.restoreMailboxWithId(context, mailboxId); in sync()
112 if ((mailbox.mType != Mailbox.TYPE_OUTBOX) && in sync()
122 Uri mailboxUri = ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailboxId); in sync()
127 values.put(Mailbox.UI_SYNC_STATUS, syncStatus); in sync()
[all …]
DPop3Service.java51 import com.android.emailcommon.provider.Mailbox;
84 long inboxId = Mailbox.findMailboxOfType(mContext, att.mAccountKey, Mailbox.TYPE_INBOX);
85 if (inboxId == Mailbox.NO_MAILBOX) return;
109 final Mailbox folder, final int deltaMessageCount) throws MessagingException { in synchronizeMailboxSynchronous()
171 final Mailbox toMailbox) throws MessagingException { in loadUnsyncedMessages()
231 final Mailbox mailbox, final int deltaMessageCount) throws MessagingException { in synchronizePop3Mailbox()
236 if (mailbox.mType != Mailbox.TYPE_INBOX) { in synchronizePop3Mailbox()
277 long trashMailboxId = Mailbox.findMailboxOfType(context, account.mId, Mailbox.TYPE_TRASH); in synchronizePop3Mailbox()
/packages/apps/Email/tests/src/com/android/email/provider/
DProviderTests.java50 import com.android.emailcommon.provider.Mailbox;
153 db.update(Mailbox.TABLE_NAME, values, null, null); in setMinusOneToMessageCounts()
159 ContentUris.withAppendedId(Mailbox.CONTENT_URI, mailboxId), in getMessageCount()
169 Context c, Mailbox b, boolean starred, boolean read, int flagLoaded) { in createMessage()
368 c = mMockContext.getContentResolver().query(Mailbox.CONTENT_URI, in getUnreadCount()
410 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, mMockContext); in testMessageSave()
454 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, mMockContext); in testMessageWithAttachment()
504 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, mMockContext); in testMessageSaveWithJustAttachments()
565 Mailbox box = ProviderTestUtils.setupMailbox("box1", account.mId, true, mMockContext); in testMessageSaveAddsSnippet()
651 Mailbox box1 = ProviderTestUtils.setupMailbox("box1", account1Id, true, mMockContext); in testLookupBodyIdWithMessageId()
[all …]
DAttachmentProviderTests.java37 import com.android.emailcommon.provider.Mailbox;
161 private static Message createMessage(Context c, Mailbox b) { in createMessage()
175 Mailbox b1 = ProviderTestUtils.setupMailbox( in testInboxQuery()
176 "box1", a1.mId, true, mMockContext, Mailbox.TYPE_INBOX); in testInboxQuery()
177 Mailbox b2 = ProviderTestUtils.setupMailbox( in testInboxQuery()
178 "box2", a1.mId, true, mMockContext, Mailbox.TYPE_MAIL); in testInboxQuery()
179 Mailbox b3 = ProviderTestUtils.setupMailbox( in testInboxQuery()
180 "box3", a2.mId, true, mMockContext, Mailbox.TYPE_INBOX); in testInboxQuery()
181 Mailbox b4 = ProviderTestUtils.setupMailbox( in testInboxQuery()
182 "box4", a2.mId, true, mMockContext, Mailbox.TYPE_MAIL); in testInboxQuery()
[all …]
DContentCacheTests.java34 import com.android.emailcommon.provider.Mailbox;
142 Mailbox box = ProviderTestUtils.setupMailbox("box2", acct.mId, true, context); in testCachedCursors()
146 Uri uri = ContentUris.withAppendedId(Mailbox.CONTENT_URI, box.mId); in testCachedCursors()
148 resolver.query(uri, Mailbox.CONTENT_PROJECTION, null, null, null); in testCachedCursors()
165 assertEquals(Mailbox.CONTENT_PROJECTION.length, columnNames.length); in testCachedCursors()
166 for (int i = 0; i < Mailbox.CONTENT_PROJECTION.length; i++) { in testCachedCursors()
167 assertEquals(Mailbox.CONTENT_PROJECTION[i], columnNames[i]); in testCachedCursors()
DProviderTestUtils.java26 import com.android.emailcommon.provider.Mailbox;
112 public static Mailbox setupMailbox(String name, long accountId, boolean saveIt, in setupMailbox()
114 return setupMailbox(name, accountId, saveIt, context, Mailbox.TYPE_MAIL); in setupMailbox()
116 public static Mailbox setupMailbox(String name, long accountId, boolean saveIt, in setupMailbox()
120 public static Mailbox setupMailbox(String name, long accountId, boolean saveIt, in setupMailbox()
122 Mailbox box = new Mailbox(); in setupMailbox()
342 public static void assertMailboxEqual(String caller, Mailbox expect, Mailbox actual) { in assertMailboxEqual()
/packages/apps/Email/provider_src/com/android/email/mail/store/
DImapStore.java45 import com.android.emailcommon.provider.Mailbox;
139 case Mailbox.TYPE_INBOX: in canSyncFolderType()
140 case Mailbox.TYPE_MAIL: in canSyncFolderType()
141 case Mailbox.TYPE_SENT: in canSyncFolderType()
142 case Mailbox.TYPE_TRASH: in canSyncFolderType()
143 case Mailbox.TYPE_JUNK: in canSyncFolderType()
145 case Mailbox.TYPE_NONE: in canSyncFolderType()
146 case Mailbox.TYPE_PARENT: in canSyncFolderType()
147 case Mailbox.TYPE_DRAFTS: in canSyncFolderType()
148 case Mailbox.TYPE_OUTBOX: in canSyncFolderType()
[all …]
/packages/apps/Email/tests/src/com/android/email/mail/
DStoreTests.java30 import com.android.emailcommon.provider.Mailbox;
102 Mailbox testMailbox = new Mailbox(); in testUpdateMailbox()
104 Store.updateMailbox(testMailbox, 1L, "inbox", '/', true, Mailbox.TYPE_MAIL); in testUpdateMailbox()
110 Store.updateMailbox(testMailbox, 2L, "inbox/a", '/', true, Mailbox.TYPE_MAIL); in testUpdateMailbox()
116 Store.updateMailbox(testMailbox, 3L, "inbox/a/b/c/d", '/', true, Mailbox.TYPE_MAIL); in testUpdateMailbox()
122 Store.updateMailbox(testMailbox, 4L, "inbox/a/b/c", '\0', true, Mailbox.TYPE_MAIL); in testUpdateMailbox()
/packages/apps/Email/src/com/android/email/activity/setup/
DMailboxSettings.java46 import com.android.emailcommon.provider.Mailbox;
237 private Mailbox mMailbox;
255 final long mailboxId = getArguments().getLong(EXTRA_MAILBOX_ID, Mailbox.NO_MAILBOX); in onActivityCreated()
256 if (mailboxId == Mailbox.NO_MAILBOX) { in onActivityCreated()
331 final Mailbox mailbox = Mailbox.restoreMailboxWithId(getContext(), mMailboxId); in loadInBackground()
372 final Mailbox mailbox = (Mailbox) in onLoadFinished()
385 if (mMailbox.mType != Mailbox.TYPE_DRAFTS) { in onLoadFinished()
468 uri = ContentUris.withAppendedId(Mailbox.CONTENT_URI, id); in saveToDatabase()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/
DMailboxField.java27 import org.apache.james.mime4j.field.address.Mailbox;
32 private final Mailbox mailbox;
35 …protected MailboxField(final String name, final String body, final String raw, final Mailbox mailb… in MailboxField()
41 public Mailbox getMailbox() { in getMailbox()
53 Mailbox mailbox = null; in parse()
/packages/apps/Email/provider_src/com/android/email/
DLegacyConversions.java44 import com.android.emailcommon.provider.Mailbox;
521 Mailbox.TYPE_INBOX); in inferMailboxTypeFromName()
524 Mailbox.TYPE_OUTBOX); in inferMailboxTypeFromName()
527 Mailbox.TYPE_DRAFTS); in inferMailboxTypeFromName()
530 Mailbox.TYPE_TRASH); in inferMailboxTypeFromName()
533 Mailbox.TYPE_SENT); in inferMailboxTypeFromName()
536 Mailbox.TYPE_JUNK); in inferMailboxTypeFromName()
539 return Mailbox.TYPE_MAIL; in inferMailboxTypeFromName()
545 return Mailbox.TYPE_MAIL; in inferMailboxTypeFromName()
/packages/apps/Email/provider_src/com/android/email/mail/
DStore.java33 import com.android.emailcommon.provider.Mailbox;
166 return (type == Mailbox.TYPE_INBOX); in canSyncFolderType()
203 protected static void updateMailbox(Mailbox mailbox, long accountId, String mailboxPath, in updateMailbox()
214 mailbox.mFlags = Mailbox.FLAG_HOLDS_MAIL | Mailbox.FLAG_ACCEPTS_MOVED_MAIL; in updateMailbox()

12