Add an option to automatically lock the app

This adds an option to automatically lock the app when:
* The back button is pressed
* The device is locked

It's the first step towards implementing #7
This commit is contained in:
Alexander Bakker 2019-04-07 18:18:50 +02:00
parent 6d93b78f9a
commit 18fd88a441
5 changed files with 45 additions and 2 deletions

View file

@ -27,6 +27,10 @@ public class Preferences {
return _prefs.getBoolean("pref_intro", false);
}
public boolean isAutoLockEnabled() {
return _prefs.getBoolean("pref_auto_lock", true);
}
public void setIntroDone(boolean done) {
_prefs.edit().putBoolean("pref_intro", done).apply();
}