remember last selected passphrase cache ttl

This commit is contained in:
Vincent Breitmoser
2017-09-20 17:01:49 +02:00
parent d04439df6b
commit 03ca1292fa
4 changed files with 25 additions and 0 deletions

View File

@@ -96,6 +96,16 @@ public class Preferences {
return mSharedPreferences.getBoolean(Pref.PASSPHRASE_CACHE_SUBS, false);
}
public int getCacheTtlSeconds() {
return mSharedPreferences.getInt(Pref.PASSPHRASE_CACHE_LAST_TTL, 0);
}
public void setCacheTtlSeconds(int ttlSeconds) {
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.putInt(Pref.PASSPHRASE_CACHE_LAST_TTL, ttlSeconds);
editor.commit();
}
public boolean getCachedConsolidate() {
return mSharedPreferences.getBoolean(Pref.CACHED_CONSOLIDATE, false);
}