-
public class WatchedSystemParameter extends SystemParameter
-
-
Constructor Summary
Constructors Constructor Description WatchedSystemParameter(Context context, SystemParameterShortName shortName, SystemParameter.SystemParameterGetter getter)Constructor WatchedSystemParameter(Context context, SystemParameterShortName shortName, SystemParameter.SystemParameterGetter getter, boolean allowed)Constructor
-
Method Summary
Modifier and Type Method Description StringgetLastValue()Get the last value savedThis mean return value from shared pref if you didn't call ``detectChanges` yet,or the last value read from the specific getter if value has changed booleanhasChanged()Detect if the values has changed since the last time we get it. -
-
Constructor Detail
-
WatchedSystemParameter
WatchedSystemParameter(Context context, SystemParameterShortName shortName, SystemParameter.SystemParameterGetter getter)
Constructor- Parameters:
context- Android's context requires to access the shared preferences.shortName- The system parameter short name enumgetter- Specific implementation of the system parameter value to get
-
WatchedSystemParameter
WatchedSystemParameter(Context context, SystemParameterShortName shortName, SystemParameter.SystemParameterGetter getter, boolean allowed)
Constructor- Parameters:
context- Android's context requires to access the shared preferences.shortName- The system parameter short name enumgetter- Specific implementation of the system parameter value to getallowed- Flag indicating whether this parameter is allowed to be send
-
-
Method Detail
-
getLastValue
@Nullable() String getLastValue()
Get the last value savedThis mean return value from shared pref if you didn't call ``detectChanges` yet,or the last value read from the specific getter if value has changed
-
hasChanged
@WorkerThread() boolean hasChanged()
Detect if the values has changed since the last time we get it.
This will save the new value if it changed
-
-
-
-