]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/Data.java
move DB access routines to the application class
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / Data.java
index cc35638e88770802a830945d03bb412e397847ff..2a6f0d5f98a4ae41ed56dc4ad48665e0236e6893 100644 (file)
@@ -21,6 +21,7 @@ import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 import android.os.AsyncTask;
 
+import net.ktnx.mobileledger.App;
 import net.ktnx.mobileledger.async.RetrieveTransactionsTask;
 import net.ktnx.mobileledger.ui.activity.MainActivity;
 import net.ktnx.mobileledger.utils.LockHolder;
@@ -103,7 +104,7 @@ public final class Data {
         String profileUUID = MLDB.getOption(MLDB.OPT_PROFILE_UUID, null);
         if (profileUUID == null) return -1;
 
-        SQLiteDatabase db = MLDB.getDatabase();
+        SQLiteDatabase db = App.getDatabase();
         try (Cursor c = db
                 .rawQuery("SELECT theme from profiles where uuid=?", new String[]{profileUUID}))
         {