docs: private @Nullable EncodedImage getThumbnail(ResizeOptions resizeOptions, int imageId)
        throws IOException {
      int thumbnailKind = getThumbnailKind(resizeOptions);
      if (thumbnailKind == NO_THUMBNAIL) {
        return null;
      }
      Cursor thumbnailCursor = null;
      try {
        thumbnailCursor = MediaStore.Images.Thumbnails.queryMiniThumbnail(
            mContentResolver,
            imageId,
            thumbnailKind,
            THUMBNAIL_PROJECTION);
        if (thumbnailCursor == null) {
           return null;
        }
        thumbnailCursor.moveToFirst();
        if (thumbnailCursor.getCount() > 0) {
          final String thumbnailUri = thumbnailCursor.getString(
              thumbnailCursor.getColumnIndex(MediaStore.Images.Thumbnails.DATA));
          if (new File(thumbnailUri).exists()) {
            return getEncodedImage(new FileInputStream(thumbnailUri), getLength(thumbnailUri));
          }
        }
      } finally {
        if (thumbnailCursor != null) {
          thumbnailCursor.close();
        }
      }
      return null;
    }