]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
use non-exclusive mode for write-enabled transactions
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index 1f2eac7360acc17e5356fa39387363297cc24d63..53896db045391996dd6d3d0d526dc343530cc435 100644 (file)
@@ -109,7 +109,7 @@ public final class MobileLedgerProfile {
     }
     public static void storeProfilesOrder() {
         SQLiteDatabase db = App.getDatabase();
-        db.beginTransaction();
+        db.beginTransactionNonExclusive();
         try {
             int orderNo = 0;
             for (MobileLedgerProfile p : Data.profiles.getValue()) {
@@ -204,7 +204,7 @@ public final class MobileLedgerProfile {
     }
     public void storeInDB() {
         SQLiteDatabase db = App.getDatabase();
-        db.beginTransaction();
+        db.beginTransactionNonExclusive();
         try {
 //            debug("profiles", String.format("Storing profile in DB: uuid=%s, name=%s, " +
 //                                            "url=%s, permit_posting=%s, authEnabled=%s, " +
@@ -323,7 +323,7 @@ public final class MobileLedgerProfile {
     public void removeFromDB() {
         SQLiteDatabase db = App.getDatabase();
         debug("db", String.format("removing profile %s from DB", uuid));
-        db.beginTransaction();
+        db.beginTransactionNonExclusive();
         try {
             Object[] uuid_param = new Object[]{uuid};
             db.execSQL("delete from profiles where uuid=?", uuid_param);