diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index edfcb1821b..a8ddfa63ee 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -4785,7 +4785,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. protected void onException(Bundle args, Throwable ex) { Log.unexpectedError(getParentFragmentManager(), ex); } - }.setLog(false).execute(this, args, "messages:expand"); + }.execute(this, args, "messages:expand"); } private void handleAutoClose() { diff --git a/app/src/main/java/eu/faircode/email/SimpleTask.java b/app/src/main/java/eu/faircode/email/SimpleTask.java index 7fd1dd5b44..a9853618f2 100644 --- a/app/src/main/java/eu/faircode/email/SimpleTask.java +++ b/app/src/main/java/eu/faircode/email/SimpleTask.java @@ -126,16 +126,20 @@ public abstract class SimpleTask implements LifecycleObserver { future = executor.submit(new Runnable() { private Object data; - private long elapse; + private long elapsed; private Throwable ex; @Override public void run() { // Run in background thread try { + if (log) + Log.i("Executing task=" + name); long start = new Date().getTime(); data = onExecute(context, args); - elapse = new Date().getTime() - start; + elapsed = new Date().getTime() - start; + if (log) + Log.i("Executed task=" + name + " elapsed=" + elapsed); } catch (Throwable ex) { if (!(ex instanceof IllegalArgumentException)) Log.e(ex); @@ -152,7 +156,7 @@ public abstract class SimpleTask implements LifecycleObserver { cleanup(context); } else if (state.isAtLeast(Lifecycle.State.RESUMED)) { // Inline delivery - Log.i("Deliver task " + name + " state=" + state + " elapse=" + elapse + " ms"); + Log.i("Deliver task " + name + " state=" + state + " elapse=" + elapsed + " ms"); deliver(); cleanup(context); } else