Removed VACUUM on update

This commit is contained in:
M66B 2020-06-28 11:23:24 +02:00
parent 73864b23bd
commit cbd972b702
2 changed files with 1 additions and 22 deletions

View File

@ -33,7 +33,6 @@ public class ReceiverAutoStart extends BroadcastReceiver {
ServiceSynchronize.boot(context);
ServiceSend.boot(context);
ServiceUI.boot(context);
WorkerCleanup.queueOnce(context);
}
}
}

View File

@ -25,9 +25,7 @@ import android.database.Cursor;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;
import androidx.work.Data;
import androidx.work.ExistingPeriodicWorkPolicy;
import androidx.work.OneTimeWorkRequest;
import androidx.work.PeriodicWorkRequest;
import androidx.work.WorkManager;
import androidx.work.Worker;
@ -62,7 +60,7 @@ public class WorkerCleanup extends Worker {
Log.i("Running " + getName());
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
cleanup(getApplicationContext(), getInputData().getBoolean("manual", false));
cleanup(getApplicationContext(), false);
return Result.success();
}
@ -269,24 +267,6 @@ public class WorkerCleanup extends Worker {
}
}
static void queueOnce(Context context) {
try {
Log.i("Queuing " + getName() + " once");
Data data = new Data.Builder().putBoolean("manual", true).build();
OneTimeWorkRequest workRequest = new OneTimeWorkRequest.Builder(WorkerCleanup.class)
.setInputData(data)
.build();
WorkManager.getInstance(context).enqueue(workRequest);
Log.i("Queued " + getName() + " once");
} catch (IllegalStateException ex) {
// https://issuetracker.google.com/issues/138465476
Log.w(ex);
}
}
static void cancel(Context context) {
try {
Log.i("Cancelling " + getName());