Commit 71ec1e08 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

The wrapped Context isn't a MockedContext anymore

parent dde3e352
...@@ -13,7 +13,6 @@ import com.frostnerd.dnschanger.database.entities.DNSRuleImport; ...@@ -13,7 +13,6 @@ import com.frostnerd.dnschanger.database.entities.DNSRuleImport;
import com.frostnerd.dnschanger.database.entities.IPPortPair; import com.frostnerd.dnschanger.database.entities.IPPortPair;
import com.frostnerd.dnschanger.database.entities.Shortcut; import com.frostnerd.dnschanger.database.entities.Shortcut;
import com.frostnerd.utils.database.CursorWithDefaults; import com.frostnerd.utils.database.CursorWithDefaults;
import com.frostnerd.utils.database.MockedContext;
import com.frostnerd.utils.database.orm.Entity; import com.frostnerd.utils.database.orm.Entity;
import com.frostnerd.utils.database.orm.parser.ParsedEntity; import com.frostnerd.utils.database.orm.parser.ParsedEntity;
import com.frostnerd.utils.database.orm.statementoptions.queryoptions.WhereCondition; import com.frostnerd.utils.database.orm.statementoptions.queryoptions.WhereCondition;
...@@ -45,7 +44,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper ...@@ -45,7 +44,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
@Nullable @Nullable
private static DatabaseHelper instance; private static DatabaseHelper instance;
@NonNull @NonNull
private MockedContext wrappedContext; private Context wrappedContext;
public static DatabaseHelper getInstance(@NonNull Context context){ public static DatabaseHelper getInstance(@NonNull Context context){
return instance == null ? instance = new DatabaseHelper(context.getApplicationContext() != null ? context.getApplicationContext() : context) : instance; return instance == null ? instance = new DatabaseHelper(context.getApplicationContext() != null ? context.getApplicationContext() : context) : instance;
...@@ -57,7 +56,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper ...@@ -57,7 +56,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
private DatabaseHelper(@NonNull Context context) { private DatabaseHelper(@NonNull Context context) {
super(context, DATABASE_NAME, DATABASE_VERSION, entities); super(context, DATABASE_NAME, DATABASE_VERSION, entities);
wrappedContext = (MockedContext) context; wrappedContext = context;
} }
@Override @Override
...@@ -141,7 +140,6 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper ...@@ -141,7 +140,6 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
@Override @Override
public synchronized void close() { public synchronized void close() {
instance = null; instance = null;
wrappedContext.destroy(false);
wrappedContext = null; wrappedContext = null;
super.close(); super.close();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment