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
5b6db05e
Commit
5b6db05e
authored
Apr 14, 2018
by
Daniel Wolf
Browse files
Drop all tables, not just Shortcuts and DNSEntries
parent
8da7cf70
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/dnschanger/database/DatabaseHelper.java
View file @
5b6db05e
...
@@ -107,8 +107,9 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
...
@@ -107,8 +107,9 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
}
}
cursor
.
close
();
cursor
.
close
();
}
}
db
.
execSQL
(
"DROP TABLE IF EXISTS Shortcuts"
);
for
(
String
s:
getTableNames
(
db
)){
db
.
execSQL
(
"DROP TABLE IF EXISTS DNSEntries"
);
db
.
execSQL
(
"DROP TABLE IF EXISTS "
+
s
);
}
onCreate
(
db
);
onCreate
(
db
);
for
(
DNSEntry
entry:
entries
)
insert
(
entry
);
for
(
DNSEntry
entry:
entries
)
insert
(
entry
);
for
(
Shortcut
shortcut:
shortcuts
)
createShortcut
(
shortcut
);
for
(
Shortcut
shortcut:
shortcuts
)
createShortcut
(
shortcut
);
...
...
Write
Preview
Supports
Markdown
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