mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 21:59:54 +01:00
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.
This commit is contained in:
@@ -89,14 +89,14 @@ public class PanicResponderActivity extends BriarActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deleteAllData() {
|
private void deleteAllData() {
|
||||||
runOnDbThread(new Runnable() {
|
new Thread() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
clearSharedPrefs();
|
||||||
// TODO somehow delete/shred the database more thoroughly
|
// TODO somehow delete/shred the database more thoroughly
|
||||||
FileUtils
|
FileUtils
|
||||||
.deleteFileOrDir(
|
.deleteFileOrDir(
|
||||||
databaseConfig.getDatabaseDirectory());
|
databaseConfig.getDatabaseDirectory());
|
||||||
clearSharedPrefs();
|
|
||||||
PanicResponder.deleteAllAppData(PanicResponderActivity.this);
|
PanicResponder.deleteAllAppData(PanicResponderActivity.this);
|
||||||
|
|
||||||
// nothing left to do after everything is deleted,
|
// nothing left to do after everything is deleted,
|
||||||
@@ -104,6 +104,7 @@ public class PanicResponderActivity extends BriarActivity {
|
|||||||
LOG.info("Signing out...");
|
LOG.info("Signing out...");
|
||||||
signOut(true);
|
signOut(true);
|
||||||
}
|
}
|
||||||
});
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user