mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 12:24:26 +01:00
Final cleanup in app context
This commit is contained in:
@@ -640,7 +640,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Scheduling,
|
||||
"### stopped self eventId=" + eventId);
|
||||
|
||||
WorkerCleanup.cleanupConditionally(ServiceSynchronize.this);
|
||||
WorkerCleanup.cleanupConditionally(getApplicationContext());
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
||||
@@ -83,7 +83,7 @@ public class WorkerCleanup extends Worker {
|
||||
|
||||
long now = new Date().getTime();
|
||||
long last_cleanup = prefs.getLong("last_cleanup", 0);
|
||||
if (last_cleanup + CLEANUP_INTERVAL * 3600 * 1000L > now) {
|
||||
if (last_cleanup + 2 * CLEANUP_INTERVAL * 3600 * 1000L > now) {
|
||||
Log.i("Skip cleanup last=" + new Date(last_cleanup));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user