Lines Matching refs:cursor

42  * results into a single cursor. It also provides a {@link Ringtone} for each
199 * The column index (in the cursor returned by {@link #getCursor()} for the
205 * The column index (in the cursor returned by {@link #getCursor()} for the
211 * The column index (in the cursor returned by {@link #getCursor()} for the
236 * constructed instance manages cursor(s).
238 * @param activity The activity used to get a managed cursor.
247 * constructor will not manage the cursor(s), so the client should handle
250 * @param context The context to used to get a cursor.
347 * cursor will be the same cursor returned each time this method is called,
348 * so do not {@link Cursor#close()} the cursor. The cursor can be
352 * caller should manage the returned cursor through its activity's life
353 * cycle to prevent leaking the cursor.
396 final Cursor cursor = getCursor();
398 if (!cursor.moveToPosition(position)) {
402 return getUriFromCursor(cursor);
405 private static Uri getUriFromCursor(Cursor cursor) {
406 return ContentUris.withAppendedId(Uri.parse(cursor.getString(URI_COLUMN_INDEX)), cursor
420 final Cursor cursor = getCursor();
421 final int cursorCount = cursor.getCount();
423 if (!cursor.moveToFirst()) {
431 String uriString = cursor.getString(URI_COLUMN_INDEX);
436 if (ringtoneUri.equals(ContentUris.withAppendedId(currentUri, cursor
441 cursor.move(1);
472 private static Uri getValidRingtoneUriFromCursorAndClose(Context context, Cursor cursor) {
473 if (cursor != null) {
476 if (cursor.moveToFirst()) {
477 uri = getUriFromCursor(cursor);
479 cursor.close();
502 // Get the external media cursor. First check to see if it is mounted.