mirror of https://github.com/M66B/FairEmail.git
Removed VACUUM on update
This commit is contained in:
parent
73864b23bd
commit
cbd972b702
|
@ -33,7 +33,6 @@ public class ReceiverAutoStart extends BroadcastReceiver {
|
||||||
ServiceSynchronize.boot(context);
|
ServiceSynchronize.boot(context);
|
||||||
ServiceSend.boot(context);
|
ServiceSend.boot(context);
|
||||||
ServiceUI.boot(context);
|
ServiceUI.boot(context);
|
||||||
WorkerCleanup.queueOnce(context);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,7 @@ import android.database.Cursor;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
import androidx.work.Data;
|
|
||||||
import androidx.work.ExistingPeriodicWorkPolicy;
|
import androidx.work.ExistingPeriodicWorkPolicy;
|
||||||
import androidx.work.OneTimeWorkRequest;
|
|
||||||
import androidx.work.PeriodicWorkRequest;
|
import androidx.work.PeriodicWorkRequest;
|
||||||
import androidx.work.WorkManager;
|
import androidx.work.WorkManager;
|
||||||
import androidx.work.Worker;
|
import androidx.work.Worker;
|
||||||
|
@ -62,7 +60,7 @@ public class WorkerCleanup extends Worker {
|
||||||
Log.i("Running " + getName());
|
Log.i("Running " + getName());
|
||||||
|
|
||||||
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
||||||
cleanup(getApplicationContext(), getInputData().getBoolean("manual", false));
|
cleanup(getApplicationContext(), false);
|
||||||
|
|
||||||
return Result.success();
|
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) {
|
static void cancel(Context context) {
|
||||||
try {
|
try {
|
||||||
Log.i("Cancelling " + getName());
|
Log.i("Cancelling " + getName());
|
||||||
|
|
Loading…
Reference in New Issue