stop giving long-living static objects Activity contexts

// FREEBIE
This commit is contained in:
Jake McGinty 2015-02-10 03:15:26 -08:00
parent ac4db41435
commit f38677794a
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ public class ApnDatabase {
private static ApnDatabase instance = null;
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;
}

View File

@ -47,7 +47,7 @@ public class TextSecureDirectory {
if (instance == null) {
synchronized (instanceLock) {
if (instance == null) {
instance = new TextSecureDirectory(context);
instance = new TextSecureDirectory(context.getApplicationContext());
}
}
}