code: public static <T> List<T> query(Class<T> targetClass, final Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder,
              CancellationSignal cancellationSignal) {
          final Cursor cursor = getContentResolver().query(uri, projection, selection, selectionArgs, sortOrder);
  
          try {
              return toList(targetClass, cursor);
          } finally {
              closeQuietly(cursor);
          }
      }
docs: Query by context.getContentResolver().
  
  @param targetClass entity class with getter/setting method.
  @param uri
  @param projection
  @param selection
  @param selectionArgs
  @param sortOrder
  @param cancellationSignal
  @return