From 680d3fda3edc1da0f6a20e8251b72030aa10b87c 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 d7da1276ae..358e9c7926 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -16,6 +16,8 @@ ([#3906](https://github.com/google/ExoPlayer/issues/3906)). * Fix crash downloading HLS media playlists ([#4396](https://github.com/google/ExoPlayer/issues/4396)). +* Fix a bug where download cancellation was ignored + ([#4403](https://github.com/google/ExoPlayer/issues/4403)). * Set `METADATA_KEY_TITLE` on media descriptions ([#4292](https://github.com/google/ExoPlayer/issues/4292)). * Allow apps to register custom MIME types 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 a1f7aa3097..c46fcd87a5 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 @@ -129,11 +129,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); } /**