mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-27 00:20:36 +00:00
stop giving long-living static objects Activity contexts
// FREEBIE
This commit is contained in:
@@ -73,7 +73,7 @@ public class ApnDatabase {
|
|||||||
private static ApnDatabase instance = null;
|
private static ApnDatabase instance = null;
|
||||||
|
|
||||||
public synchronized static ApnDatabase getInstance(Context context) throws IOException {
|
public synchronized static ApnDatabase getInstance(Context context) throws IOException {
|
||||||
if (instance == null) instance = new ApnDatabase(context);
|
if (instance == null) instance = new ApnDatabase(context.getApplicationContext());
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ public class TextSecureDirectory {
|
|||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
synchronized (instanceLock) {
|
synchronized (instanceLock) {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = new TextSecureDirectory(context);
|
instance = new TextSecureDirectory(context.getApplicationContext());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user