Merge "Put combined account last" into jb-ub-mail

This commit is contained in:
Marc Blank 2012-09-05 09:58:23 -07:00 committed by Android (Google) Code Review
commit 7110183fe5
2 changed files with 10 additions and 0 deletions

View File

@ -1713,6 +1713,12 @@ public class Imap2SyncService extends AbstractSyncService {
mResolver.update(ContentUris.withAppendedId(Mailbox.CONTENT_URI, id), values, null, null); mResolver.update(ContentUris.withAppendedId(Mailbox.CONTENT_URI, id), values, null, null);
} }
public void setMailboxLastSyncResult(long id, int result) {
ContentValues values = new ContentValues();
values.put(Mailbox.UI_LAST_SYNC_RESULT, result);
mResolver.update(ContentUris.withAppendedId(Mailbox.CONTENT_URI, id), values, null, null);
}
/** /**
* Reset the sync interval for this mailbox (account if it's Inbox) * Reset the sync interval for this mailbox (account if it's Inbox)
*/ */
@ -1764,6 +1770,7 @@ public class Imap2SyncService extends AbstractSyncService {
mSocket.setSoTimeout(IDLE_ASLEEP_MILLIS + (1*MINS)); mSocket.setSoTimeout(IDLE_ASLEEP_MILLIS + (1*MINS));
// Say we're no longer syncing (turn off indeterminate progress in the UI) // Say we're no longer syncing (turn off indeterminate progress in the UI)
setMailboxSyncStatus(mMailboxId, UIProvider.SyncStatus.NO_SYNC); setMailboxSyncStatus(mMailboxId, UIProvider.SyncStatus.NO_SYNC);
setMailboxLastSyncResult(mMailboxId, UIProvider.LastSyncResult.SUCCESS);
// Set an alarm for one minute before our timeout our expected IDLE time // Set an alarm for one minute before our timeout our expected IDLE time
Imap2SyncManager.runAsleep(mMailboxId, IDLE_ASLEEP_MILLIS); Imap2SyncManager.runAsleep(mMailboxId, IDLE_ASLEEP_MILLIS);

View File

@ -3065,6 +3065,9 @@ outer:
} }
accountCursor.close(); accountCursor.close();
} }
if (combinedAccount) {
addCombinedAccountRow(mc);
}
} finally { } finally {
accountIdCursor.close(); accountIdCursor.close();
} }