protected static void notifyConsumer(
      PooledByteBufferOutputStream pooledOutputStream,
      @Consumer.Status int status,
      @Nullable BytesRange responseBytesRange,
      Consumer<EncodedImage> consumer,
      ProducerContext context) {
    CloseableReference<PooledByteBuffer> result =
        CloseableReference.of(pooledOutputStream.toByteBuffer());
    EncodedImage encodedImage = null;
    try {
      encodedImage = new EncodedImage(result);
      encodedImage.setBytesRange(responseBytesRange);
      encodedImage.parseMetaData();
      context.putExtra(HasExtraData.KEY_ENCODED_SIZE, encodedImage.getSize());
      context.putExtra(HasExtraData.KEY_ENCODED_WIDTH, encodedImage.getWidth());
      context.putExtra(HasExtraData.KEY_ENCODED_HEIGHT, encodedImage.getHeight());
      consumer.onNewResult(encodedImage, status);
    } finally {
      EncodedImage.closeSafely(encodedImage);
      CloseableReference.closeSafely(result);
    }
  }
Time between two consecutive partial results are propagated upstream

<p>TODO 5399646: make this configurable
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/NetworkFetchProducer.java