From: Damyan Ivanov Date: Wed, 2 Jan 2019 20:44:03 +0000 (+0000) Subject: fu no context for getWritableDatabase X-Git-Tag: v0.3~142 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=b9517bfb5fb2a15aebbf8395a70944b4efac8af3;p=mobile-ledger.git fu no context for getWritableDatabase --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java index 999f16f2..26d97c53 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java @@ -1,5 +1,5 @@ /* - * Copyright © 2018 Damyan Ivanov. + * Copyright © 2019 Damyan Ivanov. * This file is part of Mobile-Ledger. * Mobile-Ledger is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -91,7 +91,7 @@ class AccountSummaryViewModel extends AndroidViewModel { } } void commitSelections(Context context) { - try(SQLiteDatabase db = MLDB.getWritableDatabase(context)) { + try (SQLiteDatabase db = MLDB.getWritableDatabase()) { db.beginTransaction(); try { for (LedgerAccount acc : accounts) {