fix ttl preference

This commit is contained in:
Dominik 2012-09-12 11:58:33 +02:00
parent 979aad6589
commit 70efa5aedf

View file

@ -59,14 +59,14 @@ public class Preferences {
editor.commit();
}
public int getPassPhraseCacheTtl() {
public long getPassPhraseCacheTtl() {
int ttl = mSharedPreferences.getInt(Constants.pref.PASS_PHRASE_CACHE_TTL, 180);
// fix the value if it was set to "never" in previous versions, which currently is not
// supported
if (ttl == 0) {
ttl = 180;
}
return ttl;
return (long) ttl;
}
public void setPassPhraseCacheTtl(int value) {