mirror of https://github.com/M66B/FairEmail.git
Log app context
This commit is contained in:
parent
2aa6c3d906
commit
a2c088cded
|
@ -129,6 +129,7 @@ public class EntityLog {
|
|||
entry.data = data;
|
||||
|
||||
final DB db = DB.getInstance(context);
|
||||
final Context acontext = context.getApplicationContext();
|
||||
|
||||
executor.submit(new Runnable() {
|
||||
@Override
|
||||
|
@ -164,17 +165,18 @@ public class EntityLog {
|
|||
long now = new Date().getTime();
|
||||
if (last_cleanup == null || last_cleanup + LOG_CLEANUP_INTERVAL < now) {
|
||||
last_cleanup = now;
|
||||
cleanup(context, now - LOG_KEEP_DURATION);
|
||||
cleanup(acontext, now - LOG_KEEP_DURATION);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static void clear(final Context context) {
|
||||
final Context acontext = context.getApplicationContext();
|
||||
executor.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
cleanup(context, new Date().getTime());
|
||||
cleanup(acontext, new Date().getTime());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue