/** * Create an {@link RawContactDeltaList} based on {@link Contacts} specified by the * given query parameters. This closes the {@link EntityIterator} when * finished, so it doesn't subscribe to updates. */ public static RawContactDeltaList fromQuery(Uri entityUri, ContentResolver resolver, String selection, String[] selectionArgs, String sortOrder) { final EntityIterator iterator = RawContacts.newEntityIterator( resolver.query(entityUri, null, selection, selectionArgs, sortOrder)); try { return fromIterator(iterator); } finally { iterator.close(); } }
/** * @return a vCard string. */ public String createOneEntryWithIterator(EntityIterator ei) { String vCard = createOneEntryInternal(null, null, ei); if (!mCursor.moveToNext()) { Log.e(LOG_TAG, "Cursor#moveToNext() returned false"); } return vCard; }
/** * TODO: javadoc * * @param cursor * @return */ public static EntityIterator newEntityIterator(Cursor cursor) { return new EntityIteratorImpl(cursor); }