From: Damyan Ivanov Date: Fri, 7 Dec 2018 05:56:44 +0000 (+0000) Subject: use the global reference instead of passing it to execute() X-Git-Tag: v0.3~302 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=4a80939836e8e3c3a63ca1d5e905f8f1e03fb122;p=mobile-ledger.git use the global reference instead of passing it to execute() --- diff --git a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java index 882403ec..ec122cd4 100644 --- a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java +++ b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java @@ -22,7 +22,6 @@ import android.widget.TextView; import java.util.Date; import static android.view.View.GONE; -import static net.ktnx.mobileledger.MobileLedgerDB.db; import static net.ktnx.mobileledger.MobileLedgerDB.set_option_value; public class AccountSummary extends AppCompatActivity { @@ -171,7 +170,7 @@ public class AccountSummary extends AppCompatActivity { }; task.setPref(PreferenceManager.getDefaultSharedPreferences(this)); - task.execute(db); + task.execute(); } } diff --git a/app/src/main/java/net/ktnx/mobileledger/RetrieveAccountsTask.java b/app/src/main/java/net/ktnx/mobileledger/RetrieveAccountsTask.java index 670b1493..0956f638 100644 --- a/app/src/main/java/net/ktnx/mobileledger/RetrieveAccountsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/RetrieveAccountsTask.java @@ -1,7 +1,6 @@ package net.ktnx.mobileledger; import android.content.SharedPreferences; -import android.database.sqlite.SQLiteDatabase; import android.util.Log; import java.io.BufferedReader; @@ -14,7 +13,9 @@ import java.net.URLDecoder; import java.util.regex.Matcher; import java.util.regex.Pattern; -abstract public class RetrieveAccountsTask extends android.os.AsyncTask { +import static net.ktnx.mobileledger.MobileLedgerDB.db; + +abstract public class RetrieveAccountsTask extends android.os.AsyncTask { int error; private SharedPreferences pref; @@ -25,8 +26,7 @@ abstract public class RetrieveAccountsTask extends android.os.AsyncTask