From ce01c79e01df7e9391addc6c7ee5d9cc61e49b1b Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 11 Oct 2019 18:42:44 +0100 Subject: [PATCH] Add a javadoc explanation for ProgressiveDownloader that explains that it tries to skip downloading already cached bytes. download calls through to CacheUtil#cache, which handles skipping already downloaded bytes. It is useful for callers to know that ProgressiveDownloader has this behavior - otherwise, they might reimplement the logic themselves. I hope this behavior is something that can be part of the public API :) PiperOrigin-RevId: 274202995 --- .../android/exoplayer2/offline/ProgressiveDownloader.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/ProgressiveDownloader.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/ProgressiveDownloader.java index 17f4047bc0..a73258272c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/offline/ProgressiveDownloader.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/ProgressiveDownloader.java @@ -29,6 +29,12 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * A downloader for progressive media streams. + * + *

The downloader attempts to download the entire media bytes referenced by a {@link Uri} into a + * cache as defined by {@link DownloaderConstructorHelper}. Callers can use the constructor to + * specify a custom cache key for the downloaded bytes. + * + *

The downloader will avoid downloading already-downloaded media bytes. */ public final class ProgressiveDownloader implements Downloader {