List of usage examples for android.content ContentProvider coerceToLocalContentProvider
@UnsupportedAppUsage public static ContentProvider coerceToLocalContentProvider(IContentProvider abstractInterface)
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;// www. j av a2s .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; }