Skip to content
Snippets Groups Projects
Verified Commit c8d0e645 authored by Torsten Grote's avatar Torsten Grote
Browse files

Delete database as panic response even when signed out

The method `runOnDbThread()` depends on an executor
that's created by roboguice at startup.
It requires to be signed in, so use a different thread instead.
parent 42d1f6de
No related branches found
No related tags found
No related merge requests found
......@@ -89,14 +89,14 @@ public class PanicResponderActivity extends BriarActivity {
}
private void deleteAllData() {
runOnDbThread(new Runnable() {
new Thread() {
@Override
public void run() {
clearSharedPrefs();
// TODO somehow delete/shred the database more thoroughly
FileUtils
.deleteFileOrDir(
databaseConfig.getDatabaseDirectory());
clearSharedPrefs();
PanicResponder.deleteAllAppData(PanicResponderActivity.this);
// nothing left to do after everything is deleted,
......@@ -104,6 +104,7 @@ public class PanicResponderActivity extends BriarActivity {
LOG.info("Signing out...");
signOut(true);
}
});
}.start();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment