|
|
@ -56,7 +56,7 @@ public class CanonicalAddressDatabase {
|
|
|
|
public static CanonicalAddressDatabase getInstance(Context context) {
|
|
|
|
public static CanonicalAddressDatabase getInstance(Context context) {
|
|
|
|
synchronized (lock) {
|
|
|
|
synchronized (lock) {
|
|
|
|
if (instance == null)
|
|
|
|
if (instance == null)
|
|
|
|
instance = new CanonicalAddressDatabase(context);
|
|
|
|
instance = new CanonicalAddressDatabase(context.getApplicationContext());
|
|
|
|
|
|
|
|
|
|
|
|
return instance;
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -69,7 +69,7 @@ public class CanonicalAddressDatabase {
|
|
|
|
|
|
|
|
|
|
|
|
public void reset(Context context) {
|
|
|
|
public void reset(Context context) {
|
|
|
|
DatabaseHelper old = this.databaseHelper;
|
|
|
|
DatabaseHelper old = this.databaseHelper;
|
|
|
|
this.databaseHelper = new DatabaseHelper(context, DATABASE_NAME, null, DATABASE_VERSION);
|
|
|
|
this.databaseHelper = new DatabaseHelper(context.getApplicationContext(), DATABASE_NAME, null, DATABASE_VERSION);
|
|
|
|
old.close();
|
|
|
|
old.close();
|
|
|
|
fillCache();
|
|
|
|
fillCache();
|
|
|
|
}
|
|
|
|
}
|
|
|
|