private boolean produceResultsFromThumbnailProducer(
      int startIndex, Consumer<EncodedImage> consumer, ProducerContext context) {
    int producerIndex =
        findFirstProducerForSize(startIndex, context.getImageRequest().getResizeOptions());

    if (producerIndex == -1) {
      return false;
    }

    mThumbnailProducers[producerIndex].produceResults(
        new ThumbnailConsumer(consumer, context, producerIndex), context);
    return true;
  }
Producer that will attempt to retrieve a thumbnail from one or more producers.

<p>The producer will try to get a result from each producer only if there is a good chance of it
being able to produce a sufficient result.

<p>If no underlying producer can provide a suitable result, null result is returned to the
consumer
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ThumbnailBranchProducer.java