Split EmailProvider into two classes (and about time)

Change-Id: Ia72e8c83ea16718077ffe8b8d284d18b6f9f0786
This commit is contained in:
Marc Blank 2012-02-03 12:07:01 -08:00
parent 87d7a60417
commit 63d60d9eb1
3 changed files with 1093 additions and 1042 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1691,7 +1691,7 @@ public class ProviderTests extends ProviderTestCase2<EmailProvider> {
public void testCreateIndex() {
String oldStr = "create index message_" + MessageColumns.TIMESTAMP
+ " on " + Message.TABLE_NAME + " (" + MessageColumns.TIMESTAMP + ");";
String newStr = EmailProvider.createIndex(Message.TABLE_NAME, MessageColumns.TIMESTAMP);
String newStr = DBHelper.createIndex(Message.TABLE_NAME, MessageColumns.TIMESTAMP);
assertEquals(newStr, oldStr);
}
@ -2139,7 +2139,7 @@ public class ProviderTests extends ProviderTestCase2<EmailProvider> {
// Batch update.
SQLiteDatabase db = getProvider().getDatabase(mMockContext);
EmailProvider.recalculateMessageCount(db);
DBHelper.recalculateMessageCount(db);
// Check message counts are valid again
assertEquals(1, getMessageCount(b1.mId));
@ -2267,7 +2267,7 @@ public class ProviderTests extends ProviderTestCase2<EmailProvider> {
assertEquals(b34, testMailbox);
SQLiteDatabase db = getProvider().getDatabase(mMockContext);
EmailProvider.upgradeFromVersion17ToVersion18(db);
DBHelper.upgradeFromVersion17ToVersion18(db);
// Verify that only IMAP/POP3 mailboxes w/ a parent key of '0' are changed
// Exchange mailboxes; none should be changed
@ -2489,7 +2489,7 @@ public class ProviderTests extends ProviderTestCase2<EmailProvider> {
try {
// Upgrade the database
SQLiteDatabase db = getProvider().getDatabase(mMockContext);
EmailProvider.upgradeFromVersion21ToVersion22(db, getContext());
DBHelper.upgradeFromVersion21ToVersion22(db, getContext());
// The pop3 and imap account should now be in account manager
amAccountList = accountManager.getAccountsByType(AccountManagerTypes.TYPE_POP_IMAP);