Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wade
DnsChanger
Commits
d58751bf
Commit
d58751bf
authored
Apr 15, 2018
by
Daniel Wolf
Browse files
sqlite_sequence may not be dropped
parent
37ba782f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/dnschanger/database/DatabaseHelper.java
View file @
d58751bf
...
...
@@ -48,7 +48,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
private
MockedContext
wrappedContext
;
public
static
DatabaseHelper
getInstance
(
@NonNull
Context
context
){
return
instance
==
null
?
instance
=
new
DatabaseHelper
(
mock
(
context
)
)
:
instance
;
return
instance
==
null
?
instance
=
new
DatabaseHelper
(
context
.
getApplicationContext
()
!=
null
?
context
.
getApplicationContext
()
:
context
)
:
instance
;
}
public
static
boolean
instanceActive
(){
...
...
@@ -108,6 +108,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
cursor
.
close
();
}
for
(
String
s:
getTableNames
(
db
)){
if
(!
s
.
equalsIgnoreCase
(
"sqlite_sequence"
))
db
.
execSQL
(
"DROP TABLE IF EXISTS "
+
s
);
}
onCreate
(
db
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment