Code example for ProviderInfo

0
 
public class MyMockContentResolver extends MockContentResolver {
 
	public MyMockContentResolver(Context context) {
		ContentProvider provider = new MockImagesProvider();
		ProviderInfo providerInfo = new ProviderInfo();
		providerInfo.authority = "media";
		providerInfo.enabled = true;
		providerInfo.isSyncable = false;
		providerInfo.packageName = MockImagesProvider.class.getPackage().getName();
		provider.attachInfo(context, providerInfo);
		super.addProvider("media", provider);
	} 
}