diff --git a/src/net/frakbot/FWeather/util/LocationHelper.java b/src/net/frakbot/FWeather/util/LocationHelper.java index fd1d700..05d70b0 100644 --- a/src/net/frakbot/FWeather/util/LocationHelper.java +++ b/src/net/frakbot/FWeather/util/LocationHelper.java @@ -135,6 +135,13 @@ private long getMinUpdateInterval() { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext); String valuePreference = sp.getString(Const.Preferences.SYNC_FREQUENCY, "300"); int value = Integer.decode(valuePreference); + if (value <= 0) { + value = 300; + try { + sp.edit().putString(Const.Preferences.SYNC_FREQUENCY, "300").commit(); + } + catch (Exception ignored) {} + } return value * 1000; }