am 1a7838ee: Update folder structure on every POP or IMAP sync

* commit '1a7838eed7558a8f5caa23128518cae09d8a034f':
  Update folder structure on every POP or IMAP sync
This commit is contained in:
Martin Hibdon 2013-09-13 15:50:45 -07:00 committed by Android Git Automerger
commit 4a56a5ba34

View File

@ -206,14 +206,14 @@ public class PopImapSyncAdapterService extends Service {
LogUtils.d(TAG, extras.toString());
long mailboxId =
extras.getLong(Mailbox.SYNC_EXTRA_MAILBOX_ID, Mailbox.NO_MAILBOX);
if (mailboxId == Mailbox.NO_MAILBOX) {
// Update folders.
EmailServiceProxy service =
EmailServiceUtils.getServiceForAccount(context, acct.mId);
service.updateFolderList(acct.mId);
mailboxId = Mailbox.findMailboxOfType(context, acct.mId,
Mailbox.TYPE_INBOX);
}
// We update our folder structure on every sync.
final EmailServiceProxy service =
EmailServiceUtils.getServiceForAccount(context, acct.mId);
service.updateFolderList(acct.mId);
mailboxId = Mailbox.findMailboxOfType(context, acct.mId,
Mailbox.TYPE_INBOX);
if (mailboxId == Mailbox.NO_MAILBOX) return;
boolean uiRefresh =
extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false);