|
|
@ -183,7 +183,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
future = getExecutor(context).submit(new Runnable() {
|
|
|
|
future = getExecutor(context).submit(new Runnable() {
|
|
|
|
private Object data;
|
|
|
|
private Object data;
|
|
|
|
private long elapsed;
|
|
|
|
private long elapsed;
|
|
|
|
private Throwable ex;
|
|
|
|
private Throwable error;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
@ -206,7 +206,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
Log.i(ex);
|
|
|
|
Log.i(ex);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|
this.ex = ex;
|
|
|
|
error = ex;
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
if (wl.isHeld())
|
|
|
|
if (wl.isHeld())
|
|
|
|
wl.release();
|
|
|
|
wl.release();
|
|
|
@ -283,7 +283,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (ex == null) {
|
|
|
|
if (error == null) {
|
|
|
|
if (log && BuildConfig.BETA_RELEASE) {
|
|
|
|
if (log && BuildConfig.BETA_RELEASE) {
|
|
|
|
Log.i("Crumb " + name);
|
|
|
|
Log.i("Crumb " + name);
|
|
|
|
Map<String, String> crumb = new HashMap<>();
|
|
|
|
Map<String, String> crumb = new HashMap<>();
|
|
|
@ -294,7 +294,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
onExecuted(args, (T) data);
|
|
|
|
onExecuted(args, (T) data);
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
onException(args, ex);
|
|
|
|
onException(args, error);
|
|
|
|
} catch (Throwable exex) {
|
|
|
|
} catch (Throwable exex) {
|
|
|
|
Log.e(exex);
|
|
|
|
Log.e(exex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|