From c1ccdc5f9bf34ea9068e1334408d90b3acb30c43 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 16 Apr 2012 10:31:38 -0700 Subject: [PATCH] When provider starts, initialize folder status Bug: 6316761 Change-Id: I916ff7b6881971f685420972635423567cd97761 --- .../src/com/android/email/provider/EmailProvider.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/email2/src/com/android/email/provider/EmailProvider.java b/email2/src/com/android/email/provider/EmailProvider.java index 095abc8f8..02bb74094 100644 --- a/email2/src/com/android/email/provider/EmailProvider.java +++ b/email2/src/com/android/email/provider/EmailProvider.java @@ -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