From a610857017ce795a296bd654e8739a613d064beb Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Thu, 21 Jun 2018 08:03:30 -0700 Subject: [PATCH] Fix download cancellation Issue: #4403 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201525284 --- RELEASENOTES.md | 2 ++ .../android/exoplayer2/upstream/cache/CacheUtil.java | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4017698ff9..c308bc7547 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -38,6 +38,8 @@ CommentFrame to InternalFrame for frames with gapless metadata in MP4. * Allow setting the `Looper`, which is used to access the player, in `ExoPlayerFactory` ([#4278](https://github.com/google/ExoPlayer/issues/4278)). +* Fix a bug where download cancellation was ignored + ([#4403](https://github.com/google/ExoPlayer/issues/4403)). ### 2.8.2 ### diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheUtil.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheUtil.java index 5db4f20ca2..9052aceb93 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheUtil.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheUtil.java @@ -138,11 +138,11 @@ public final class CacheUtil { cache, new CacheDataSource(cache, upstream), new byte[DEFAULT_BUFFER_SIZE_BYTES], - null, - 0, + /* priorityTaskManager= */ null, + /* priority= */ 0, counters, - null, - false); + isCanceled, + /* enableEOFException= */ false); } /**