Lines Matching refs:Mailbox
15 import com.android.emailcommon.provider.Mailbox;
110 final long[] mailboxIds = Mailbox.getMailboxIdsFromBundle(mSyncExtras);
111 final int mailboxType = mSyncExtras.getInt(Mailbox.SYNC_EXTRA_MAILBOX_TYPE,
112 Mailbox.TYPE_NONE);
117 final boolean pushOnly = Mailbox.isPushOnlyExtras(mSyncExtras);
119 final boolean accountOnly = Mailbox.isAccountOnlyExtras(mSyncExtras);
125 mailboxType == Mailbox.TYPE_NONE);
173 // Sync the mailbox that was explicitly requested.
187 c = Mailbox.getMailboxIdsForSync(mContext.getContentResolver(), mAccount.mId);
190 c = Mailbox.getMailboxIdsForSyncByType(mContext.getContentResolver(),
214 final Mailbox mailbox = Mailbox.restoreMailboxWithId(mContext, folderId);
215 if (mailbox == null) {
220 if (mailbox.mAccountKey != mAccount.mId) {
221 LogUtils.e(TAG, "Mailbox does not match account: mailbox %s, %s", mAccount.toString(),
226 if (mAuthsToSync != null && !mAuthsToSync.contains(Mailbox.getAuthority(mailbox.mType))) {
227 // We are asking for an account sync, but this mailbox type is not configured for
232 if (mailbox.mType == Mailbox.TYPE_DRAFTS) {
244 // Non-mailbox syncs are whole account syncs initiated by the AccountManager and are
246 if (mailbox.mType == Mailbox.TYPE_OUTBOX || mailbox.isSyncable()) {
248 updateMailbox(mailbox, cv, isUserSync ?
251 if (mailbox.mType == Mailbox.TYPE_OUTBOX) {
252 return syncOutbox(mailbox.mId);
256 mailbox.mId, EmailServiceStatus.IN_PROGRESS, 0,
259 final EasSyncBase operation = new EasSyncBase(mContext, mAccount, mailbox);
263 updateMailbox(mailbox, cv, EmailContent.SYNC_STATUS_NONE);
266 mailbox.mId, EmailServiceStatus.SUCCESS, 0,
271 // This mailbox is not syncable.
329 * Update the mailbox's sync status with the provider and, if we're finished with the sync,
331 * @param mailbox The mailbox whose sync status to update.
335 private void updateMailbox(final Mailbox mailbox, final ContentValues cv,
337 cv.put(Mailbox.UI_SYNC_STATUS, syncStatus);
339 cv.put(Mailbox.SYNC_TIME, System.currentTimeMillis());
341 mailbox.update(mContext, cv);