2019-02-07 22:39:33 +01:00
|
|
|
package com.beemdevelopment.aegis;
|
2018-05-11 20:08:51 +02:00
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
import android.preference.PreferenceManager;
|
|
|
|
|
|
|
|
public class Preferences {
|
|
|
|
private SharedPreferences _prefs;
|
|
|
|
|
|
|
|
public Preferences(Context context) {
|
|
|
|
_prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isDarkModeEnabled() {
|
|
|
|
return _prefs.getBoolean("pref_dark_mode", false);
|
|
|
|
}
|
|
|
|
|
2019-03-25 21:32:29 +01:00
|
|
|
public boolean isTapToRevealEnabled() {
|
|
|
|
return _prefs.getBoolean("pref_tap_to_reveal", false);
|
|
|
|
}
|
|
|
|
|
2018-05-11 20:08:51 +02:00
|
|
|
public boolean isSecureScreenEnabled() {
|
|
|
|
return _prefs.getBoolean("pref_secure_screen", true);
|
|
|
|
}
|
|
|
|
|
2018-09-19 00:10:03 +02:00
|
|
|
public boolean isAccountNameVisible() {
|
|
|
|
return _prefs.getBoolean("pref_account_name", false);
|
2018-05-11 20:08:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isIntroDone() {
|
|
|
|
return _prefs.getBoolean("pref_intro", false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIntroDone(boolean done) {
|
|
|
|
_prefs.edit().putBoolean("pref_intro", done).apply();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getTimeout() {
|
|
|
|
return _prefs.getInt("pref_timeout", -1);
|
|
|
|
}
|
|
|
|
}
|