Remove deprecated WorkManagerScheduler constructor

Use a non deprecated constructor that includes the option to provide a `Context` parameter instead.

#minor-release

PiperOrigin-RevId: 532535770
(cherry picked from commit df52864420da49e97405c905c7e218e4112573df)
This commit is contained in:
rohks 2023-05-16 20:14:01 +01:00 committed by Tofunmi Adigun-Hameed
parent fa152ddc80
commit 7773c88404
2 changed files with 3 additions and 10 deletions

View File

@ -37,6 +37,9 @@
Kotlin Charsets from the `kotlin.text` package, the
`java.nio.charset.StandardCharsets` or the
`com.google.common.base.Charsets` instead.
* Remove deprecated `WorkManagerScheduler` constructor, use a non
deprecated constructor that includes the option to provide a `Context`
parameter instead.
### 1.0.2 (2023-05-18)

View File

@ -56,16 +56,6 @@ public final class WorkManagerScheduler implements Scheduler {
private final WorkManager workManager;
private final String workName;
/**
* @deprecated Call {@link #WorkManagerScheduler(Context, String)} instead.
*/
@Deprecated
@SuppressWarnings("deprecation")
public WorkManagerScheduler(String workName) {
this.workName = workName;
workManager = WorkManager.getInstance();
}
/**
* @param context A context.
* @param workName A name for work scheduled by this instance. If the same name was used by a