use Util.SDK_INT

use androidX workmanager
This commit is contained in:
Philippe Simons 2019-04-17 12:41:10 +02:00
parent a2282ad0dd
commit 1c7cbef1b9
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ android {
dependencies {
implementation project(modulePrefix + 'library-core')
implementation 'android.arch.work:work-runtime:1.0.1'
implementation 'androidw.work:work-runtime:2.0.1'
}
ext {

View File

@ -94,7 +94,7 @@ public final class WorkManagerScheduler implements Scheduler {
builder.setRequiresCharging(true);
}
if (requirements.isIdleRequired() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (requirements.isIdleRequired() && Util.SDK_INT >= 23) {
builder.setRequiresDeviceIdle(true);
}