From ca3ae83e42a5a3d553101150711e5edb9f7d085c Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Tue, 5 Mar 2019 21:18:39 +0200 Subject: [PATCH] increment the background task counter immediately before starting the task so that the try/finally construct guarantees the correct counting --- .../net/ktnx/mobileledger/async/UpdateTransactionsTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java index f8e262ef..4edf5c12 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java @@ -35,11 +35,11 @@ import java.util.Date; public class UpdateTransactionsTask extends AsyncTask { protected String doInBackground(String[] filterAccName) { - Data.backgroundTaskCount.incrementAndGet(); final MobileLedgerProfile profile = Data.profile.get(); if (profile == null) return "Profile not configured"; String profile_uuid = profile.getUuid(); + Data.backgroundTaskCount.incrementAndGet(); try { ArrayList newList = new ArrayList<>(); -- 2.39.2