Here you can find the source of findOne(Context context, Uri uri)
public static ContentValues findOne(Context context, Uri uri)
//package com.java2s; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.DatabaseUtils; import android.net.Uri; import android.util.Log; public class Main { private static String TAG = "AlarmUtils"; public static ContentValues findOne(Context context, Uri uri) { if (context == null) { Log.e(TAG, "findOne: cannot get context"); return null; }/*from w ww. j av a 2 s . c o m*/ Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); if (cursor == null || !cursor.moveToFirst()) { Log.e(TAG, String.format("findOne: alarm %s not found", uri)); return null; } ContentValues alarm = new ContentValues(); DatabaseUtils.cursorRowToContentValues(cursor, alarm); return alarm; } }