summaryrefslogtreecommitdiffstats
path: root/test-runner/src
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-02-26 15:02:06 -0800
committerDianne Hackborn <hackbod@google.com>2013-02-26 16:16:14 -0800
commit334d9aebc28f7d5213b1671997488b3e3f118e29 (patch)
treeb6fc253e257b391ac5055162c042bd90711444ed /test-runner/src
parentd0d209ed4d6280b6e1203eebe823f04f9db766c0 (diff)
downloadframeworks_base-334d9aebc28f7d5213b1671997488b3e3f118e29.zip
frameworks_base-334d9aebc28f7d5213b1671997488b3e3f118e29.tar.gz
frameworks_base-334d9aebc28f7d5213b1671997488b3e3f118e29.tar.bz2
New ContentProvider initialization for testing.
Using this turns off app ops checks. Change-Id: If29d4ca2fe9ddf1a1663d3a824b2f0afe7375862
Diffstat (limited to 'test-runner/src')
-rw-r--r--test-runner/src/android/test/ProviderTestCase.java4
-rw-r--r--test-runner/src/android/test/ProviderTestCase2.java4
-rw-r--r--test-runner/src/android/test/RenamingDelegatingContext.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/test-runner/src/android/test/ProviderTestCase.java b/test-runner/src/android/test/ProviderTestCase.java
index 74cebee..1b323cf 100644
--- a/test-runner/src/android/test/ProviderTestCase.java
+++ b/test-runner/src/android/test/ProviderTestCase.java
@@ -68,7 +68,7 @@ public abstract class ProviderTestCase<T extends ContentProvider>
mProviderContext = new IsolatedContext(mResolver, targetContextWrapper);
mProvider = mProviderClass.newInstance();
- mProvider.attachInfo(mProviderContext, null);
+ mProvider.attachInfoForTesting(mProviderContext, null);
assertNotNull(mProvider);
mResolver.addProvider(mProviderAuthority, getProvider());
}
@@ -108,7 +108,7 @@ public abstract class ProviderTestCase<T extends ContentProvider>
DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
T provider = providerClass.newInstance();
- provider.attachInfo(context, null);
+ provider.attachInfoForTesting(context, null);
resolver.addProvider(authority, provider);
return resolver;
diff --git a/test-runner/src/android/test/ProviderTestCase2.java b/test-runner/src/android/test/ProviderTestCase2.java
index f7c4e03..dcd089d 100644
--- a/test-runner/src/android/test/ProviderTestCase2.java
+++ b/test-runner/src/android/test/ProviderTestCase2.java
@@ -140,7 +140,7 @@ public abstract class ProviderTestCase2<T extends ContentProvider> extends Andro
mProviderContext = new IsolatedContext(mResolver, targetContextWrapper);
mProvider = mProviderClass.newInstance();
- mProvider.attachInfo(mProviderContext, null);
+ mProvider.attachInfoForTesting(mProviderContext, null);
assertNotNull(mProvider);
mResolver.addProvider(mProviderAuthority, getProvider());
}
@@ -219,7 +219,7 @@ public abstract class ProviderTestCase2<T extends ContentProvider> extends Andro
DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
T provider = providerClass.newInstance();
- provider.attachInfo(context, null);
+ provider.attachInfoForTesting(context, null);
resolver.addProvider(authority, provider);
return resolver;
diff --git a/test-runner/src/android/test/RenamingDelegatingContext.java b/test-runner/src/android/test/RenamingDelegatingContext.java
index eee3ad7..3d763c7 100644
--- a/test-runner/src/android/test/RenamingDelegatingContext.java
+++ b/test-runner/src/android/test/RenamingDelegatingContext.java
@@ -63,7 +63,7 @@ public class RenamingDelegatingContext extends ContextWrapper {
if (allowAccessToExistingFilesAndDbs) {
mContext.makeExistingFilesAndDbsAccessible();
}
- mProvider.attachInfo(mContext, null);
+ mProvider.attachInfoForTesting(mContext, null);
return mProvider;
}