mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +00:00
Small improvements
This commit is contained in:
parent
fc2ab4542e
commit
ef6ae847ba
1 changed files with 3 additions and 2 deletions
|
@ -53,7 +53,7 @@ public class WorkerCleanup extends Worker {
|
||||||
private static final long KEEP_CONTACTS_DURATION = 365 * 24 * 3600 * 1000L; // milliseconds
|
private static final long KEEP_CONTACTS_DURATION = 365 * 24 * 3600 * 1000L; // milliseconds
|
||||||
private static final int KEEP_CONTACTS_COUNT = 10000;
|
private static final int KEEP_CONTACTS_COUNT = 10000;
|
||||||
|
|
||||||
private static Semaphore semaphore = new Semaphore(1);
|
private static final Semaphore semaphore = new Semaphore(1);
|
||||||
|
|
||||||
public WorkerCleanup(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
public WorkerCleanup(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
||||||
super(context, workerParams);
|
super(context, workerParams);
|
||||||
|
@ -63,11 +63,12 @@ public class WorkerCleanup extends Worker {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Result doWork() {
|
public Result doWork() {
|
||||||
|
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
||||||
|
|
||||||
EntityLog.log(getApplicationContext(),
|
EntityLog.log(getApplicationContext(),
|
||||||
"Running " + getName() +
|
"Running " + getName() +
|
||||||
" process=" + android.os.Process.myPid());
|
" process=" + android.os.Process.myPid());
|
||||||
|
|
||||||
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
|
||||||
cleanup(getApplicationContext(), false);
|
cleanup(getApplicationContext(), false);
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|
Loading…
Reference in a new issue