From e08f8e03661c9780e4a8f291fd04cab2448de19d Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 22 Dec 2018 08:12:09 +0000 Subject: [PATCH] MLDB: always use the application context kind of global singleton thing --- app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java b/app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java index 1073a88f..4f627779 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java @@ -53,10 +53,10 @@ public final class MLDB { } } public static SQLiteDatabase getReadableDatabase(Context context) { - return getDatabase(context, READ); + return getDatabase(context.getApplicationContext(), READ); } public static SQLiteDatabase getWritableDatabase(Context context) { - return getDatabase(context, WRITE); + return getDatabase(context.getApplicationContext(), WRITE); } static public int get_option_value(Context context, String name, int default_value) { String s = get_option_value(context, name, String.valueOf(default_value)); -- 2.39.5