diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerFactory.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerFactory.java index efe351c70a..e4f239df77 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerFactory.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerFactory.java @@ -278,6 +278,7 @@ public final class ExoPlayerFactory { * be passed to {@link SimpleExoPlayer.Builder} and should instead be injected into the {@link * MediaSource} factories. */ + @SuppressWarnings("deprecation") @Deprecated public static SimpleExoPlayer newSimpleInstance( Context context, diff --git a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java index 68b3e241fe..06aea69035 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java @@ -253,6 +253,7 @@ public class DefaultDrmSessionManager * to {@link ExoMediaDrm#getKeyRequest(byte[], List, int, HashMap)}. May be null. * @deprecated Use {@link Builder} instead. */ + @SuppressWarnings("deprecation") @Deprecated public DefaultDrmSessionManager( UUID uuid, diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloaderConstructorHelper.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloaderConstructorHelper.java index cd090c2c5e..0d53b3cde0 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloaderConstructorHelper.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloaderConstructorHelper.java @@ -21,7 +21,6 @@ import com.google.android.exoplayer2.upstream.DataSink; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DummyDataSource; import com.google.android.exoplayer2.upstream.FileDataSource; -import com.google.android.exoplayer2.upstream.FileDataSourceFactory; import com.google.android.exoplayer2.upstream.PriorityDataSourceFactory; import com.google.android.exoplayer2.upstream.cache.Cache; import com.google.android.exoplayer2.upstream.cache.CacheDataSink; @@ -60,7 +59,8 @@ public final class DownloaderConstructorHelper { * @param upstreamFactory A {@link DataSource.Factory} for creating {@link DataSource}s for * downloading data. * @param cacheReadDataSourceFactory A {@link DataSource.Factory} for creating {@link DataSource}s - * for reading data from the cache. If null then a {@link FileDataSourceFactory} will be used. + * for reading data from the cache. If null then a {@link FileDataSource.Factory} will be + * used. * @param cacheWriteDataSinkFactory A {@link DataSink.Factory} for creating {@link DataSource}s * for writing data to the cache. If null then a {@link CacheDataSinkFactory} will be used. * @param priorityTaskManager A {@link PriorityTaskManager} to use when downloading. If non-null, @@ -87,7 +87,8 @@ public final class DownloaderConstructorHelper { * @param upstreamFactory A {@link DataSource.Factory} for creating {@link DataSource}s for * downloading data. * @param cacheReadDataSourceFactory A {@link DataSource.Factory} for creating {@link DataSource}s - * for reading data from the cache. If null then a {@link FileDataSourceFactory} will be used. + * for reading data from the cache. If null then a {@link FileDataSource.Factory} will be + * used. * @param cacheWriteDataSinkFactory A {@link DataSink.Factory} for creating {@link DataSource}s * for writing data to the cache. If null then a {@link CacheDataSinkFactory} will be used. * @param priorityTaskManager A {@link PriorityTaskManager} to use when downloading. If non-null, diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java index dec035c12e..98026c4677 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java @@ -113,7 +113,6 @@ public final class DefaultDataSource implements DataSource { context, new DefaultHttpDataSource( userAgent, - /* contentTypePredicate= */ null, connectTimeoutMillis, readTimeoutMillis, allowCrossProtocolRedirects, diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java index 436cad0d64..ae115ab58c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java @@ -49,8 +49,8 @@ import java.util.zip.GZIPInputStream; * *

By default this implementation will not follow cross-protocol redirects (i.e. redirects from * HTTP to HTTPS or vice versa). Cross-protocol redirects can be enabled by using the {@link - * #DefaultHttpDataSource(String, Predicate, int, int, boolean, RequestProperties)} constructor and - * passing {@code true} as the second last argument. + * #DefaultHttpDataSource(String, int, int, boolean, RequestProperties)} constructor and passing + * {@code true} for the {@code allowCrossProtocolRedirects} argument. * *

Note: HTTP request headers will be set using all parameters passed via (in order of decreasing * priority) the {@code dataSpec}, {@link #setRequestProperty} and the default parameters used to @@ -171,6 +171,7 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou * @deprecated Use {@link #DefaultHttpDataSource(String, int, int)} and {@link * #setContentTypePredicate(Predicate)}. */ + @SuppressWarnings("deprecation") @Deprecated public DefaultHttpDataSource( String userAgent,