Commit 67fc1f0c by olly Committed by bachinger

Remove deprecated Downloader constructors

PiperOrigin-RevId: 371307278
parent 8c7d6447
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
*/ */
package com.google.android.exoplayer2.offline; package com.google.android.exoplayer2.offline;
import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.MediaItem;
...@@ -45,14 +44,6 @@ public final class ProgressiveDownloader implements Downloader { ...@@ -45,14 +44,6 @@ public final class ProgressiveDownloader implements Downloader {
private volatile @MonotonicNonNull RunnableFutureTask<Void, IOException> downloadRunnable; private volatile @MonotonicNonNull RunnableFutureTask<Void, IOException> downloadRunnable;
private volatile boolean isCanceled; 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. * Creates a new instance.
* *
...@@ -66,22 +57,6 @@ public final class ProgressiveDownloader implements Downloader { ...@@ -66,22 +57,6 @@ public final class ProgressiveDownloader implements Downloader {
} }
/** /**
* @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. * Creates a new instance.
* *
* @param mediaItem The media item with a uri to the stream to be downloaded. * @param mediaItem The media item with a uri to the stream to be downloaded.
......
...@@ -15,14 +15,12 @@ ...@@ -15,14 +15,12 @@
*/ */
package com.google.android.exoplayer2.source.dash.offline; package com.google.android.exoplayer2.source.dash.offline;
import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.extractor.ChunkIndex; import com.google.android.exoplayer2.extractor.ChunkIndex;
import com.google.android.exoplayer2.offline.DownloadException; import com.google.android.exoplayer2.offline.DownloadException;
import com.google.android.exoplayer2.offline.SegmentDownloader; 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.DashSegmentIndex;
import com.google.android.exoplayer2.source.dash.DashUtil; import com.google.android.exoplayer2.source.dash.DashUtil;
import com.google.android.exoplayer2.source.dash.DashWrappingSegmentIndex; import com.google.android.exoplayer2.source.dash.DashWrappingSegmentIndex;
...@@ -72,14 +70,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType; ...@@ -72,14 +70,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
*/ */
public final class DashDownloader extends SegmentDownloader<DashManifest> { public final class DashDownloader extends SegmentDownloader<DashManifest> {
/** @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory)} instead. */
@SuppressWarnings("deprecation")
@Deprecated
public DashDownloader(
Uri manifestUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run);
}
/** /**
* Creates a new instance. * Creates a new instance.
* *
...@@ -92,21 +82,6 @@ public final class DashDownloader extends SegmentDownloader<DashManifest> { ...@@ -92,21 +82,6 @@ public final class DashDownloader extends SegmentDownloader<DashManifest> {
} }
/** /**
* @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
*/
@Deprecated
public DashDownloader(
Uri manifestUri,
List<StreamKey> streamKeys,
CacheDataSource.Factory cacheDataSourceFactory,
Executor executor) {
this(
new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(),
cacheDataSourceFactory,
executor);
}
/**
* Creates a new instance. * Creates a new instance.
* *
* @param mediaItem The {@link MediaItem} to be downloaded. * @param mediaItem The {@link MediaItem} to be downloaded.
......
...@@ -19,7 +19,6 @@ import android.net.Uri; ...@@ -19,7 +19,6 @@ import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.offline.SegmentDownloader; 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.HlsMasterPlaylist;
import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist; import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist;
import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylist; import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylist;
...@@ -65,14 +64,6 @@ import java.util.concurrent.Executor; ...@@ -65,14 +64,6 @@ import java.util.concurrent.Executor;
*/ */
public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> { public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
/** @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory)} instead. */
@SuppressWarnings("deprecation")
@Deprecated
public HlsDownloader(
Uri playlistUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
this(playlistUri, streamKeys, cacheDataSourceFactory, Runnable::run);
}
/** /**
* Creates a new instance. * Creates a new instance.
* *
...@@ -85,21 +76,6 @@ public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> { ...@@ -85,21 +76,6 @@ public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
} }
/** /**
* @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
*/
@Deprecated
public HlsDownloader(
Uri playlistUri,
List<StreamKey> streamKeys,
CacheDataSource.Factory cacheDataSourceFactory,
Executor executor) {
this(
new MediaItem.Builder().setUri(playlistUri).setStreamKeys(streamKeys).build(),
cacheDataSourceFactory,
executor);
}
/**
* Creates a new instance. * Creates a new instance.
* *
* @param mediaItem The {@link MediaItem} to be downloaded. * @param mediaItem The {@link MediaItem} to be downloaded.
......
...@@ -17,10 +17,8 @@ package com.google.android.exoplayer2.source.smoothstreaming.offline; ...@@ -17,10 +17,8 @@ package com.google.android.exoplayer2.source.smoothstreaming.offline;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import android.net.Uri;
import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.offline.SegmentDownloader; 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;
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement; import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement;
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifestParser; import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifestParser;
...@@ -62,16 +60,6 @@ import java.util.concurrent.Executor; ...@@ -62,16 +60,6 @@ import java.util.concurrent.Executor;
public final class SsDownloader extends SegmentDownloader<SsManifest> { public final class SsDownloader extends SegmentDownloader<SsManifest> {
/** /**
* @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
public SsDownloader(
Uri manifestUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run);
}
/**
* Creates an instance. * Creates an instance.
* *
* @param mediaItem The {@link MediaItem} to be downloaded. * @param mediaItem The {@link MediaItem} to be downloaded.
...@@ -83,21 +71,6 @@ public final class SsDownloader extends SegmentDownloader<SsManifest> { ...@@ -83,21 +71,6 @@ public final class SsDownloader extends SegmentDownloader<SsManifest> {
} }
/** /**
* @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
*/
@Deprecated
public SsDownloader(
Uri manifestUri,
List<StreamKey> streamKeys,
CacheDataSource.Factory cacheDataSourceFactory,
Executor executor) {
this(
new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(),
cacheDataSourceFactory,
executor);
}
/**
* Creates an instance. * Creates an instance.
* *
* @param mediaItem The {@link MediaItem} to be downloaded. * @param mediaItem The {@link MediaItem} to be downloaded.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment