|
|
@ -174,7 +174,6 @@ public class WorkerCleanup extends Worker {
|
|
|
|
Constraints.Builder constraints = new Constraints.Builder();
|
|
|
|
Constraints.Builder constraints = new Constraints.Builder();
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !BuildConfig.DEBUG)
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !BuildConfig.DEBUG)
|
|
|
|
constraints.setRequiresDeviceIdle(true);
|
|
|
|
constraints.setRequiresDeviceIdle(true);
|
|
|
|
constraints.setRequiresBatteryNotLow(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PeriodicWorkRequest workRequest =
|
|
|
|
PeriodicWorkRequest workRequest =
|
|
|
|
new PeriodicWorkRequest.Builder(WorkerCleanup.class, CLEANUP_INTERVAL, TimeUnit.HOURS)
|
|
|
|
new PeriodicWorkRequest.Builder(WorkerCleanup.class, CLEANUP_INTERVAL, TimeUnit.HOURS)
|
|
|
|