ContentProvider Update()

public class PetProvider extends ContentProvider {

	...

	@Override
	public int update(Uri uri, ContentValues contentValues, String selection,
		String[] selectionArgs){
		final int match = sUriMatcher.match(uri);
		switch (match){
			case PETS:
				return updatePet(uri, contentValues, selection, selectionArgs);
			case PET_ID:
				selection = PetEntry._ID + "=?";
				selectionArgs = new String[] { String.valueOf(ContentUris.parseId(uri))};
				return updatePet(uri, contentValues, selection, selectionArgs);
			default:
				throw new IllegalArgumentException("Update is not supported for " + uri);
		}
	}
}