inline-ttl: support "screen off" in preference
This commit is contained in:
@@ -321,6 +321,7 @@ public class Preferences {
|
||||
public static final ArrayList<Integer> CACHE_TTLS;
|
||||
static {
|
||||
HashMap<Integer,Integer> cacheTtlNames = new HashMap<>();
|
||||
cacheTtlNames.put(0, R.string.cache_ttl_lock_screen);
|
||||
cacheTtlNames.put(60 * 5, R.string.cache_ttl_five_minutes);
|
||||
cacheTtlNames.put(60 * 60, R.string.cache_ttl_one_hour);
|
||||
cacheTtlNames.put(60 * 60 * 3, R.string.cache_ttl_three_hours);
|
||||
@@ -353,10 +354,11 @@ public class Preferences {
|
||||
|
||||
public static CacheTTLPrefs getDefault() {
|
||||
ArrayList<String> ttlStrings = new ArrayList<>();
|
||||
ttlStrings.add(Integer.toString(0));
|
||||
ttlStrings.add(Integer.toString(60 * 5));
|
||||
ttlStrings.add(Integer.toString(60 * 60));
|
||||
ttlStrings.add(Integer.toString(60 * 60 * 24));
|
||||
return new CacheTTLPrefs(ttlStrings, 60 * 5);
|
||||
return new CacheTTLPrefs(ttlStrings, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user