Don't sign out when panic button is triggered if configured not to.

This commit is contained in:
akwizgran
2020-08-13 10:19:33 +01:00
parent e7ac6aef8c
commit 9603ff93e9

View File

@@ -57,15 +57,19 @@ public class PanicResponderActivity extends BriarActivity {
if (sharedPref.getBoolean(KEY_PURGE, false)) {
LOG.info("Purging all data...");
signOut(true, true);
} else {
} else if (sharedPref.getBoolean(KEY_LOCK, true)) {
LOG.info("Signing out...");
signOut(true, false);
} else {
LOG.info("Configured not to purge or lock");
}
} else if (sharedPref.getBoolean(KEY_LOCK, true)) {
// non-destructive actions are allowed by non-connected
// trusted apps
LOG.info("Signing out...");
signOut(true, false);
} else {
LOG.info("Configured not to lock");
}
}
}