am 63d60d9e: Split EmailProvider into two classes (and about time)

* commit '63d60d9eb182d583d08e6d4b6dc11b392dede6f1':
  Split EmailProvider into two classes (and about time)
This commit is contained in:
Marc Blank 2012-02-03 12:53:19 -08:00 committed by Android Git Automerger
commit c1092fb9bc
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);