Commit 3643b4e6 by ibaker Committed by Tofunmi Adigun-Hameed

Remove deprecated `DownloadManager` constructor

Use the constructor that takes an `Executor` instead.

#minor-release

PiperOrigin-RevId: 534370613
(cherry picked from commit b56fddfa01b85eb7370308057c0c69eb0c779f1c)
parent 78414e92
...@@ -200,23 +200,6 @@ public final class DownloadManager { ...@@ -200,23 +200,6 @@ public final class DownloadManager {
* an {@link CacheEvictor} that will not evict downloaded content, for example {@link * an {@link CacheEvictor} that will not evict downloaded content, for example {@link
* NoOpCacheEvictor}. * NoOpCacheEvictor}.
* @param upstreamFactory A {@link Factory} for creating {@link DataSource}s for downloading data. * @param upstreamFactory A {@link Factory} for creating {@link DataSource}s for downloading data.
* @deprecated Use {@link #DownloadManager(Context, DatabaseProvider, Cache, Factory, Executor)}.
*/
@Deprecated
public DownloadManager(
Context context, DatabaseProvider databaseProvider, Cache cache, Factory upstreamFactory) {
this(context, databaseProvider, cache, upstreamFactory, Runnable::run);
}
/**
* Constructs a {@link DownloadManager}.
*
* @param context Any context.
* @param databaseProvider Provides the SQLite database in which downloads are persisted.
* @param cache A cache to be used to store downloaded data. The cache should be configured with
* an {@link CacheEvictor} that will not evict downloaded content, for example {@link
* NoOpCacheEvictor}.
* @param upstreamFactory A {@link Factory} for creating {@link DataSource}s for downloading data.
* @param executor An {@link Executor} used to download data. Passing {@code Runnable::run} will * @param executor An {@link Executor} used to download data. Passing {@code Runnable::run} will
* cause each download task to download data on its own thread. Passing an {@link Executor} * cause each download task to download data on its own thread. Passing an {@link Executor}
* that uses multiple threads will speed up download tasks that can be split into smaller * that uses multiple threads will speed up download tasks that can be split into smaller
......
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