Package 

Class WatchedSystemParameter

    • 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 enum
        getter - 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 enum
        getter - Specific implementation of the system parameter value to get
        allowed - 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