mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +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 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) {
|
||||
super(context, workerParams);
|
||||
|
@ -63,11 +63,12 @@ public class WorkerCleanup extends Worker {
|
|||
@NonNull
|
||||
@Override
|
||||
public Result doWork() {
|
||||
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
||||
|
||||
EntityLog.log(getApplicationContext(),
|
||||
"Running " + getName() +
|
||||
" process=" + android.os.Process.myPid());
|
||||
|
||||
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
|
||||
cleanup(getApplicationContext(), false);
|
||||
|
||||
return Result.success();
|
||||
|
|
Loading…
Reference in a new issue