public DataSource<Void> prefetchToBitmapCache(
      ImageRequest imageRequest,
      Object callerContext) {
    if (!mIsPrefetchEnabledSupplier.get()) {
      return DataSources.immediateFailedDataSource(PREFETCH_EXCEPTION);
    }
    try {
      final Boolean shouldDecodePrefetches = imageRequest.shouldDecodePrefetches();
      final boolean skipBitmapCache =
          shouldDecodePrefetches != null
              ? !shouldDecodePrefetches // use imagerequest param if specified
              : mSuppressBitmapPrefetchingSupplier
                  .get(); // otherwise fall back to pipeline's default
      Producer<Void> producerSequence =
          skipBitmapCache
              ? mProducerSequenceFactory.getEncodedImagePrefetchProducerSequence(imageRequest)
              : mProducerSequenceFactory.getDecodedImagePrefetchProducerSequence(imageRequest);
      return submitPrefetchRequest(
          producerSequence,
          imageRequest,
          ImageRequest.RequestLevel.FULL_FETCH,
          callerContext,
          Priority.MEDIUM);
    } catch (Exception exception) {
      return DataSources.immediateFailedDataSource(exception);
    }
  }
public DataSource < Void > prefetchToBitmapCache ( ImageRequest imageRequest , Object callerContext ) { if ( ! mIsPrefetchEnabledSupplier . get ( ) ) { return DataSources . immediateFailedDataSource ( PREFETCH_EXCEPTION ) ; } try { final Boolean shouldDecodePrefetches = imageRequest . shouldDecodePrefetches ( ) ; final boolean skipBitmapCache = shouldDecodePrefetches != null ? ! shouldDecodePrefetches : mSuppressBitmapPrefetchingSupplier . get ( ) ; Producer < Void > producerSequence = skipBitmapCache ? mProducerSequenceFactory . getEncodedImagePrefetchProducerSequence ( imageRequest ) : mProducerSequenceFactory . getDecodedImagePrefetchProducerSequence ( imageRequest ) ; return submitPrefetchRequest ( producerSequence , imageRequest , ImageRequest . RequestLevel . FULL_FETCH , callerContext , Priority . MEDIUM ) ; } catch ( Exception exception ) { return DataSources . immediateFailedDataSource ( exception ) ; } }
Submits a request for prefetching to the bitmap cache.

<p> Beware that if your network fetcher doesn't support priorities prefetch requests may slow
down images which are immediately required on screen.

@param imageRequest the request to submit
@return a DataSource that can safely be ignored.