Class WeatherSettings.Updates
- java.lang.Object
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherSettings.Updates
-
- Enclosing class:
- WeatherSettings
public static class WeatherSettings.Updates extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WeatherSettings.Updates.Category
static class
WeatherSettings.Updates.DeprecatedPreferences
class
WeatherSettings.Updates.Intervals
-
Field Summary
Fields Modifier and Type Field Description static int
CategoryItemsCount
static java.lang.String
PREF_UPDATE_LAYERS_INTERVAL
static java.lang.String
PREF_UPDATE_LAYERS_SYNC
static java.lang.String
PREF_UPDATE_POLLEN_INTERVAL
static java.lang.String
PREF_UPDATE_POLLEN_SYNC
static java.lang.String
PREF_UPDATE_TEXTS_INTERVAL
static java.lang.String
PREF_UPDATE_TEXTS_SYNC
static java.lang.String
PREF_UPDATE_WARNINGS_INTERVAL
static java.lang.String
PREF_UPDATE_WARNINGS_SYNC
static java.lang.String
PREF_UPDATE_WEATHER_INTERVAL
static java.lang.String
PREF_UPDATE_WEATHER_SYNC
-
Constructor Summary
Constructors Constructor Description Updates()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
getIntervalMillis(Context context, int category)
static long
getMillis(int interval)
static long
getSyncAdapterIntervalInMillis(Context context, Weather.WeatherLocation weatherLocation)
static int
getSyncAdapterIntervalInSeconds(Context context, Weather.WeatherLocation weatherLocation)
static int
getSyncInterval(Context context, int category)
static boolean
isSyncEnabled(Context context, int category)
static void
setSyncEnabled(Context context, int category, boolean enabled)
static void
setSyncInterval(Context context, int category, int interval)
-
-
-
Field Detail
-
CategoryItemsCount
public static final int CategoryItemsCount
- See Also:
- Constant Field Values
-
PREF_UPDATE_WEATHER_SYNC
public static final java.lang.String PREF_UPDATE_WEATHER_SYNC
- See Also:
- Constant Field Values
-
PREF_UPDATE_WEATHER_INTERVAL
public static final java.lang.String PREF_UPDATE_WEATHER_INTERVAL
- See Also:
- Constant Field Values
-
PREF_UPDATE_WARNINGS_SYNC
public static final java.lang.String PREF_UPDATE_WARNINGS_SYNC
- See Also:
- Constant Field Values
-
PREF_UPDATE_WARNINGS_INTERVAL
public static final java.lang.String PREF_UPDATE_WARNINGS_INTERVAL
- See Also:
- Constant Field Values
-
PREF_UPDATE_TEXTS_SYNC
public static final java.lang.String PREF_UPDATE_TEXTS_SYNC
- See Also:
- Constant Field Values
-
PREF_UPDATE_TEXTS_INTERVAL
public static final java.lang.String PREF_UPDATE_TEXTS_INTERVAL
- See Also:
- Constant Field Values
-
PREF_UPDATE_POLLEN_SYNC
public static final java.lang.String PREF_UPDATE_POLLEN_SYNC
- See Also:
- Constant Field Values
-
PREF_UPDATE_POLLEN_INTERVAL
public static final java.lang.String PREF_UPDATE_POLLEN_INTERVAL
- See Also:
- Constant Field Values
-
PREF_UPDATE_LAYERS_SYNC
public static final java.lang.String PREF_UPDATE_LAYERS_SYNC
- See Also:
- Constant Field Values
-
PREF_UPDATE_LAYERS_INTERVAL
public static final java.lang.String PREF_UPDATE_LAYERS_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMillis
public static long getMillis(int interval)
-
isSyncEnabled
public static boolean isSyncEnabled(Context context, int category)
-
setSyncEnabled
public static void setSyncEnabled(Context context, int category, boolean enabled)
-
getSyncInterval
public static int getSyncInterval(Context context, int category)
-
setSyncInterval
public static void setSyncInterval(Context context, int category, int interval)
-
getIntervalMillis
public static long getIntervalMillis(Context context, int category)
-
getSyncAdapterIntervalInMillis
public static long getSyncAdapterIntervalInMillis(Context context, Weather.WeatherLocation weatherLocation)
-
getSyncAdapterIntervalInSeconds
public static int getSyncAdapterIntervalInSeconds(Context context, Weather.WeatherLocation weatherLocation)
-
-