When provider starts, initialize folder status

Bug: 6316761

Change-Id: I916ff7b6881971f685420972635423567cd97761
This commit is contained in:
Marc Blank 2012-04-16 10:31:38 -07:00
parent 49927a0ae4
commit c1ccdc5f9b

View File

@ -530,11 +530,20 @@ public class EmailProvider extends ContentProvider {
Account.TABLE_NAME);
deleteUnlinked(mDatabase, Policy.TABLE_NAME, PolicyColumns.ID, AccountColumns.POLICY_KEY,
Account.TABLE_NAME);
initUiProvider();
preCacheData();
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
* @param tableUri the table uri