Update folder structure on every POP or IMAP sync
b/10729228 Change-Id: I9e62d5de10222f1d81b47a68dd0b3ab05de5436d
This commit is contained in:
parent
17d014dfdf
commit
1a7838eed7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user