use of sugar.free.sightparser.error.CancelledException in project SightRemote by TebbeUbben.
the class StatusActivity method onError.
@Override
public void onError(Exception e) {
if (!(e instanceof CancelledException) && !(e instanceof DisconnectedError)) {
Snackbar snackbar = Snackbar.make(getRootView(), R.string.error, Snackbar.LENGTH_INDEFINITE);
snackbar.setAction(R.string.retry, view -> taskRunnerRunnable.run());
showSnackbar(snackbar);
CrashlyticsUtil.logExceptionWithCallStackTrace(e);
}
}
use of sugar.free.sightparser.error.CancelledException in project SightRemote by TebbeUbben.
the class TaskRunner method cancel.
public void cancel() {
if (resultCallback != null) {
cancelled = true;
active = false;
messageCallback.onError(new CancelledException());
}
}
Aggregations