mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
5b4618f1b7
commit
2fc6e5d603
|
@ -183,7 +183,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||
future = getExecutor(context).submit(new Runnable() {
|
||||
private Object data;
|
||||
private long elapsed;
|
||||
private Throwable ex;
|
||||
private Throwable error;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -206,7 +206,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||
Log.i(ex);
|
||||
else
|
||||
Log.e(ex);
|
||||
this.ex = ex;
|
||||
error = ex;
|
||||
} finally {
|
||||
if (wl.isHeld())
|
||||
wl.release();
|
||||
|
@ -283,7 +283,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||
}
|
||||
} finally {
|
||||
try {
|
||||
if (ex == null) {
|
||||
if (error == null) {
|
||||
if (log && BuildConfig.BETA_RELEASE) {
|
||||
Log.i("Crumb " + name);
|
||||
Map<String, String> crumb = new HashMap<>();
|
||||
|
@ -294,7 +294,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||
onExecuted(args, (T) data);
|
||||
} else
|
||||
try {
|
||||
onException(args, ex);
|
||||
onException(args, error);
|
||||
} catch (Throwable exex) {
|
||||
Log.e(exex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue