List of usage examples for android.content ContentResolver acquireProvider
@UnsupportedAppUsage public final IContentProvider acquireProvider(String name)
From source file:android.syncml.pim.vcard.VCardDataBuilder.java
private void tryGetOriginalProvider() { final ContentResolver resolver = mContentResolver; if ((mMyContactsGroupId = Contacts.People.tryGetMyContactsGroupId(resolver)) == 0) { Log.e(LOG_TAG, "Could not get group id of MyContact"); return;/*from w w w.j av a 2s. c om*/ } IContentProvider iProviderForName = resolver.acquireProvider(Contacts.CONTENT_URI); ContentProvider contentProvider = ContentProvider.coerceToLocalContentProvider(iProviderForName); if (contentProvider == null) { Log.e(LOG_TAG, "Fail to get ContentProvider object."); return; } if (!(contentProvider instanceof AbstractSyncableContentProvider)) { Log.e(LOG_TAG, "Acquired ContentProvider object is not AbstractSyncableContentProvider."); return; } mProvider = (AbstractSyncableContentProvider) contentProvider; }