Merge "Fix CP2 unit tests" into nyc-dev am: 69a3ec5c23
am: 0c967500a9
* commit '0c967500a9bc35c3b39133bf3ceba59bfbad6f5a':
Fix CP2 unit tests
diff --git a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java
index 0d063e8..e6b8b86 100644
--- a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java
+++ b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java
@@ -2923,8 +2923,8 @@
}
public void testUpdateMetadataOnRawContactInsert() throws Exception {
- ContactMetadataProvider contactMetadataProvider = (ContactMetadataProvider) addProvider(
- ContactMetadataProvider.class, MetadataSync.METADATA_AUTHORITY);
+ ContactMetadataProvider contactMetadataProvider = addProvider(
+ ContactMetadataProviderTestable.class, MetadataSync.METADATA_AUTHORITY);
// Reset the dbHelper to be the one ContactsProvider2 is using. Before this, two providers
// are using different dbHelpers.
contactMetadataProvider.setDatabaseHelper(((SynchronousContactsProvider2)
@@ -2979,8 +2979,8 @@
}
public void testUpdateMetadataOnRawContactBackupIdChange() throws Exception {
- ContactMetadataProvider contactMetadataProvider = (ContactMetadataProvider) addProvider(
- ContactMetadataProvider.class, MetadataSync.METADATA_AUTHORITY);
+ ContactMetadataProvider contactMetadataProvider = addProvider(
+ ContactMetadataProviderTestable.class, MetadataSync.METADATA_AUTHORITY);
// Reset the dbHelper to be the one ContactsProvider2 is using. Before this, two providers
// are using different dbHelpers.
contactMetadataProvider.setDatabaseHelper(((SynchronousContactsProvider2)
@@ -3045,8 +3045,8 @@
}
public void testDeleteMetadataOnRawContactDelete() throws Exception {
- ContactMetadataProvider contactMetadataProvider = (ContactMetadataProvider) addProvider(
- ContactMetadataProvider.class, MetadataSync.METADATA_AUTHORITY);
+ ContactMetadataProvider contactMetadataProvider = addProvider(
+ ContactMetadataProviderTestable.class, MetadataSync.METADATA_AUTHORITY);
// Reset the dbHelper to be the one ContactsProvider2 is using. Before this, two providers
// are using different dbHelpers.
contactMetadataProvider.setDatabaseHelper(((SynchronousContactsProvider2)
@@ -6654,8 +6654,8 @@
mActor.setAccounts(new Account[]{doomedAccount, safeAccount});
cp.onAccountsUpdated(new Account[]{doomedAccount, safeAccount});
- ContactMetadataProvider contactMetadataProvider = (ContactMetadataProvider) addProvider(
- ContactMetadataProvider.class, MetadataSync.METADATA_AUTHORITY);
+ ContactMetadataProvider contactMetadataProvider = addProvider(
+ ContactMetadataProviderTestable.class, MetadataSync.METADATA_AUTHORITY);
// Reset the dbHelper to be the one ContactsProvider2 is using. Before this, two providers
// are using different dbHelpers.
contactMetadataProvider.setDatabaseHelper(((SynchronousContactsProvider2)