diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Activities/PanicResponderActivity.java b/app/src/main/java/org/shadowice/flocke/andotp/Activities/PanicResponderActivity.java index ef6a2c8b..59a8890f 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Activities/PanicResponderActivity.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Activities/PanicResponderActivity.java @@ -29,8 +29,12 @@ import android.os.Bundle; import org.shadowice.flocke.andotp.Utilities.Settings; +import java.io.File; import java.util.Set; +import static org.shadowice.flocke.andotp.Utilities.DatabaseHelper.SETTINGS_FILE; +import static org.shadowice.flocke.andotp.Utilities.KeyStoreHelper.KEY_FILE; + public class PanicResponderActivity extends Activity { public static final String PANIC_TRIGGER_ACTION = "info.guardianproject.panic.action.TRIGGER"; @@ -44,8 +48,13 @@ public class PanicResponderActivity extends Activity { Set response = settings.getPanicResponse(); - if (response.contains("accounts")) - // TODO: wipe database by deleting the files + if (response.contains("accounts")) { + File database = new File(getFilesDir() + "/" + SETTINGS_FILE); + File key = new File(getFilesDir() + "/" + KEY_FILE); + + database.delete(); + key.delete(); + } if (response.contains("settings")) settings.clear(true);