From 67fc1f0c0a2fd18c7e6d5b215b5ad25c9535b01c Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 30 Apr 2021 12:19:33 +0100 Subject: [PATCH] Remove deprecated Downloader constructors PiperOrigin-RevId: 371307278 --- .../offline/ProgressiveDownloader.java | 25 ----------------- .../source/dash/offline/DashDownloader.java | 25 ----------------- .../source/hls/offline/HlsDownloader.java | 24 ----------------- .../smoothstreaming/offline/SsDownloader.java | 27 ------------------- 4 files changed, 101 deletions(-) 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 35a3e788f5..c2d93f2045 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 @@ -15,7 +15,6 @@ */ package com.google.android.exoplayer2.offline; -import android.net.Uri; import androidx.annotation.Nullable; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.MediaItem; @@ -45,14 +44,6 @@ public final class ProgressiveDownloader implements Downloader { private volatile @MonotonicNonNull RunnableFutureTask downloadRunnable; private volatile boolean isCanceled; - /** @deprecated Use {@link #ProgressiveDownloader(MediaItem, CacheDataSource.Factory)} instead. */ - @SuppressWarnings("deprecation") - @Deprecated - public ProgressiveDownloader( - Uri uri, @Nullable String customCacheKey, CacheDataSource.Factory cacheDataSourceFactory) { - this(uri, customCacheKey, cacheDataSourceFactory, Runnable::run); - } - /** * Creates a new instance. * @@ -65,22 +56,6 @@ public final class ProgressiveDownloader implements Downloader { this(mediaItem, cacheDataSourceFactory, Runnable::run); } - /** - * @deprecated Use {@link #ProgressiveDownloader(MediaItem, CacheDataSource.Factory, Executor)} - * instead. - */ - @Deprecated - public ProgressiveDownloader( - Uri uri, - @Nullable String customCacheKey, - CacheDataSource.Factory cacheDataSourceFactory, - Executor executor) { - this( - new MediaItem.Builder().setUri(uri).setCustomCacheKey(customCacheKey).build(), - cacheDataSourceFactory, - executor); - } - /** * Creates a new instance. * diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java index ed195ec417..253bcbb8a4 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java @@ -15,14 +15,12 @@ */ package com.google.android.exoplayer2.source.dash.offline; -import android.net.Uri; import androidx.annotation.Nullable; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.extractor.ChunkIndex; import com.google.android.exoplayer2.offline.DownloadException; import com.google.android.exoplayer2.offline.SegmentDownloader; -import com.google.android.exoplayer2.offline.StreamKey; import com.google.android.exoplayer2.source.dash.DashSegmentIndex; import com.google.android.exoplayer2.source.dash.DashUtil; import com.google.android.exoplayer2.source.dash.DashWrappingSegmentIndex; @@ -72,14 +70,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType; */ public final class DashDownloader extends SegmentDownloader { - /** @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory)} instead. */ - @SuppressWarnings("deprecation") - @Deprecated - public DashDownloader( - Uri manifestUri, List streamKeys, CacheDataSource.Factory cacheDataSourceFactory) { - this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run); - } - /** * Creates a new instance. * @@ -91,21 +81,6 @@ public final class DashDownloader extends SegmentDownloader { this(mediaItem, cacheDataSourceFactory, Runnable::run); } - /** - * @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead. - */ - @Deprecated - public DashDownloader( - Uri manifestUri, - List streamKeys, - CacheDataSource.Factory cacheDataSourceFactory, - Executor executor) { - this( - new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(), - cacheDataSourceFactory, - executor); - } - /** * Creates a new instance. * diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java index 39462f3d06..e68ffcc7c9 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java @@ -19,7 +19,6 @@ import android.net.Uri; import androidx.annotation.Nullable; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.offline.SegmentDownloader; -import com.google.android.exoplayer2.offline.StreamKey; import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist; import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist; import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylist; @@ -65,14 +64,6 @@ import java.util.concurrent.Executor; */ public final class HlsDownloader extends SegmentDownloader { - /** @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory)} instead. */ - @SuppressWarnings("deprecation") - @Deprecated - public HlsDownloader( - Uri playlistUri, List streamKeys, CacheDataSource.Factory cacheDataSourceFactory) { - this(playlistUri, streamKeys, cacheDataSourceFactory, Runnable::run); - } - /** * Creates a new instance. * @@ -84,21 +75,6 @@ public final class HlsDownloader extends SegmentDownloader { this(mediaItem, cacheDataSourceFactory, Runnable::run); } - /** - * @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead. - */ - @Deprecated - public HlsDownloader( - Uri playlistUri, - List streamKeys, - CacheDataSource.Factory cacheDataSourceFactory, - Executor executor) { - this( - new MediaItem.Builder().setUri(playlistUri).setStreamKeys(streamKeys).build(), - cacheDataSourceFactory, - executor); - } - /** * Creates a new instance. * diff --git a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java index 998820de4b..cf06774824 100644 --- a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java +++ b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java @@ -17,10 +17,8 @@ package com.google.android.exoplayer2.source.smoothstreaming.offline; import static com.google.android.exoplayer2.util.Assertions.checkNotNull; -import android.net.Uri; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.offline.SegmentDownloader; -import com.google.android.exoplayer2.offline.StreamKey; import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest; import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement; import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifestParser; @@ -61,16 +59,6 @@ import java.util.concurrent.Executor; */ public final class SsDownloader extends SegmentDownloader { - /** - * @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead. - */ - @SuppressWarnings("deprecation") - @Deprecated - public SsDownloader( - Uri manifestUri, List streamKeys, CacheDataSource.Factory cacheDataSourceFactory) { - this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run); - } - /** * Creates an instance. * @@ -82,21 +70,6 @@ public final class SsDownloader extends SegmentDownloader { this(mediaItem, cacheDataSourceFactory, Runnable::run); } - /** - * @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead. - */ - @Deprecated - public SsDownloader( - Uri manifestUri, - List streamKeys, - CacheDataSource.Factory cacheDataSourceFactory, - Executor executor) { - this( - new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(), - cacheDataSourceFactory, - executor); - } - /** * Creates an instance. *