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(); editor.commit();
} }
public int getPassPhraseCacheTtl() { public long getPassPhraseCacheTtl() {
int ttl = mSharedPreferences.getInt(Constants.pref.PASS_PHRASE_CACHE_TTL, 180); 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 // fix the value if it was set to "never" in previous versions, which currently is not
// supported // supported
if (ttl == 0) { if (ttl == 0) {
ttl = 180; ttl = 180;
} }
return ttl; return (long) ttl;
} }
public void setPassPhraseCacheTtl(int value) { public void setPassPhraseCacheTtl(int value) {