Merge "When provider starts, initialize folder status"

This commit is contained in:
Marc Blank 2012-04-16 13:52:05 -07:00 committed by Android (Google) Code Review
commit e7cab0a8a4

View File

@ -530,11 +530,20 @@ public class EmailProvider extends ContentProvider {
Account.TABLE_NAME); Account.TABLE_NAME);
deleteUnlinked(mDatabase, Policy.TABLE_NAME, PolicyColumns.ID, AccountColumns.POLICY_KEY, deleteUnlinked(mDatabase, Policy.TABLE_NAME, PolicyColumns.ID, AccountColumns.POLICY_KEY,
Account.TABLE_NAME); Account.TABLE_NAME);
initUiProvider();
preCacheData(); preCacheData();
return mDatabase; return mDatabase;
} }
/**
* Perform startup actions related to UI
*/
private void initUiProvider() {
// Clear mailbox sync status
mDatabase.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UI_SYNC_STATUS +
"=" + UIProvider.SyncStatus.NO_SYNC);
}
/** /**
* Pre-cache all of the items in a given table meeting the selection criteria * Pre-cache all of the items in a given table meeting the selection criteria
* @param tableUri the table uri * @param tableUri the table uri