]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RefreshDescriptionsTask.java
bump gradle version to 4.0.1
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RefreshDescriptionsTask.java
index 62885c1b82de1a34c829459d3d74fc6c997604e9..50e70479691623cb6bc7036a88a28ec8ac5ea260 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -22,7 +22,6 @@ import android.database.sqlite.SQLiteDatabase;
 import android.os.AsyncTask;
 
 import net.ktnx.mobileledger.App;
-import net.ktnx.mobileledger.model.Data;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -37,9 +36,9 @@ public class RefreshDescriptionsTask extends AsyncTask<Void, Void, Void> {
         debug("descriptions", "Starting refresh");
         SQLiteDatabase db = App.getDatabase();
 
-        Data.backgroundTaskStarted();
+//        Data.backgroundTaskStarted();
         try {
-            db.beginTransaction();
+            db.beginTransactionNonExclusive();
             try {
                 db.execSQL("UPDATE description_history set keep=0");
                 try (Cursor c = db
@@ -65,7 +64,7 @@ public class RefreshDescriptionsTask extends AsyncTask<Void, Void, Void> {
             }
         }
         finally {
-            Data.backgroundTaskFinished();
+//            Data.backgroundTaskFinished();
             debug("descriptions", "Refresh done");
         }