Code example for ContentProvider

Methods: query

0
  @Implementation 
  public final Cursor query(Uri uri, String[] projection, String selection,
      String[] selectionArgs, String sortOrder) {
    ContentProvider provider = getProvider(uri);
    if (provider != null) {
      return provider.query(uri, projection, selection, selectionArgs, sortOrder);
    } else { 
      TestCursor returnCursor = getCursor(uri);
      if (returnCursor == null) {
        return null; 
      } 
 
      returnCursor.setQuery(uri, projection, selection, selectionArgs,
          sortOrder);
      return returnCursor;
    } 
  } 
 
  @Implementation 
  public final int delete(Uri url, String where, String[] selectionArgs) {
Stop searching for code, let great code find you!  Add Codota to your java IDE