summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
673119d)
fixes a glitch when a retrieval error suggests changing profile
configuration, and from there the profile is deleted and activity
restarted because of the change of the active profile. the new activity
instance observes the retrieval result and gets the error and reports it
erroneously
public synchronized void stopTransactionsRetrieval() {
if (retrieveTransactionsTask != null)
retrieveTransactionsTask.cancel(true);
public synchronized void stopTransactionsRetrieval() {
if (retrieveTransactionsTask != null)
retrieveTransactionsTask.cancel(true);
+ else
+ Data.backgroundTaskProgress.setValue(null);
}
public void transactionRetrievalDone() {
retrieveTransactionsTask = null;
}
public void transactionRetrievalDone() {
retrieveTransactionsTask = null;
b.transactionProgressLayout.setVisibility(View.GONE);
}
}
b.transactionProgressLayout.setVisibility(View.GONE);
}
}
- public void onRetrieveProgress(RetrieveTransactionsTask.Progress progress) {
- if (progress.getState() == RetrieveTransactionsTask.ProgressState.FINISHED) {
+ public void onRetrieveProgress(@Nullable RetrieveTransactionsTask.Progress progress) {
+ if (progress == null ||
+ progress.getState() == RetrieveTransactionsTask.ProgressState.FINISHED)
+ {
Logger.debug("progress", "Done");
b.transactionProgressLayout.setVisibility(View.GONE);
mainModel.transactionRetrievalDone();
Logger.debug("progress", "Done");
b.transactionProgressLayout.setVisibility(View.GONE);
mainModel.transactionRetrievalDone();
- String error = progress.getError();
+ String error = (progress == null) ? null : progress.getError();
if (error != null) {
if (error.equals(RetrieveTransactionsTask.Result.ERR_JSON_PARSER_ERROR))
error = getResources().getString(R.string.err_json_parser_error);
if (error != null) {
if (error.equals(RetrieveTransactionsTask.Result.ERR_JSON_PARSER_ERROR))
error = getResources().getString(R.string.err_json_parser_error);