diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java index ff95afb1f6..d176b1905c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java @@ -448,6 +448,7 @@ public final class DownloadHelper { break; case DownloadRequest.TYPE_PROGRESSIVE: return new ProgressiveMediaSource.Factory(dataSourceFactory) + .setCustomCacheKey(downloadRequest.customCacheKey) .createMediaSource(downloadRequest.uri); default: throw new IllegalStateException("Unsupported type: " + downloadRequest.type); diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java index f05b576acb..512fbce4a2 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java @@ -111,7 +111,7 @@ public final class ProgressiveMediaSource extends BaseMediaSource * @return This factory, for convenience. * @throws IllegalStateException If {@link #createMediaSource(Uri)} has already been called. */ - public Factory setCustomCacheKey(String customCacheKey) { + public Factory setCustomCacheKey(@Nullable String customCacheKey) { Assertions.checkState(!isCreateCalled); this.customCacheKey = customCacheKey; return this;