|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.android.activityminer.logic.util.AbstractActivatableComponentImpl
org.android.activityminer.logic.configuration.GlobalSharedPreferenceObserver
public final class GlobalSharedPreferenceObserver
Global singleton instance of a central shared preference observer which is notifying registered shared preference observers about changes.
Field Summary | |
---|---|
private Context |
context
The application context. |
private Configuration |
currentConfig
The actual configuration. |
private static GlobalSharedPreferenceObserver |
instance
The global singleton instance |
private SparseArray<String> |
mapKeyToViolationMessage
The mapping of preference keys to the related limit violation message. |
private ConcurrentLinkedQueue<SharedPreferenceChangeNotificationReceiver> |
observers
The observer collection |
private SharedPreferences |
preferences
A reference to the shared preferences. |
private SharedPreferences.OnSharedPreferenceChangeListener |
prefListener
The listener for shared preferences changes. |
Constructor Summary | |
---|---|
private |
GlobalSharedPreferenceObserver(Context applicationContext)
Constructor |
Method Summary | |
---|---|
boolean |
addToSelectedFeatures(FeatureTypes[] featureTypes)
Method to update the selected features by adding additional ones |
private double |
getBeta(SharedPreferences sharedPreferences)
Does read the current beta value from the shared preferences. |
private double |
getBWCutOffFrequency(SharedPreferences sharedPreferences)
Does read the current Butterworth cut-off frequency value from the shared preferences. |
private int |
getBWFilterOrder(SharedPreferences sharedPreferences)
Does read the current Butterworth filter order value from the shared preferences. |
Configuration |
getConfiguration()
Does create a configuration from the current shared preference values. |
protected long |
getCountDownTime(SharedPreferences sharedPreferences)
Does read the current count-down time from the shared preferences. |
private int |
getEvaluationAccuracyThreshold(SharedPreferences sharedPreferences)
Does read the accuracy threshold for evaluation from the shared preferences. |
private FilterTypes |
getFilterType(SharedPreferences sharedPreferences)
Does read the filter type from the shared preferences. |
private double |
getGravitationCutOffFrequency(SharedPreferences sharedPreferences)
Does read the current gravitation filter cut-off frequency value from the shared preferences. |
static GlobalSharedPreferenceObserver |
getInstance(Context applicationContext)
Getter for the global instance |
protected boolean |
getLocationDataUsageFlag(SharedPreferences sharedPreferences)
Does read the location data usage flag from the shared preferences. |
private int |
getMaximumRecordingTime(SharedPreferences sharedPreferences)
Does read the current maximum recording time from the shared preferences. |
protected long |
getMaximumSampleRate(SharedPreferences sharedPreferences)
Does read the maximum sample rate from the shared preferences. |
private double |
getMinCutOffFrequency(SharedPreferences sharedPreferences)
Does read the current minimum cut-off frequency value from the shared preferences. |
private int |
getOverlapSize(SharedPreferences sharedPreferences)
Does read the current cutOut overlap size from the shared preferences. |
private boolean |
getOwnAccImplUsageFlag(SharedPreferences sharedPreferences)
Does read the flag for usage of internal linear accelerometer implementation from the shared preferences. |
private int |
getParameterKForKNN(SharedPreferences sharedPreferences)
Does read the parameter k for the nearest neighbor classifier from the shared preferences. |
protected boolean |
getParameterNormalizeForKNN(SharedPreferences sharedPreferences)
Does read the KNN parameter for normalization from the shared preferences. |
protected int |
getParamterKForCrossValidation(SharedPreferences sharedPreferences)
Does read the parameter k for cross validation from the shared preferences. |
private double |
getPreferenceValue(SharedPreferences sharedPreferences,
int keyId,
double defaultValue)
Getter for double preference values |
private int |
getPreferenceValue(SharedPreferences sharedPreferences,
int keyId,
int defaultValue)
Getter for integer preference values |
private long |
getPreferenceValue(SharedPreferences sharedPreferences,
int keyId,
long defaultValue)
Getter for long preference values |
protected long |
getRecordingTime(SharedPreferences sharedPreferences)
Does read the current recording time from the shared preferences. |
protected long |
getSampleRate(SharedPreferences sharedPreferences)
Does read the current sample rate from the shared preferences. |
private Long[] |
getSelectedClasses(SharedPreferences sharedPreferences)
Does read the selected classes from the shared preferences. |
protected ClassifierTypes |
getSelectedClassifierType(SharedPreferences sharedPreferences)
Does read the classifier type from the shared preferences. |
private boolean |
getSelectionState(FeatureTypes featureType,
SharedPreferences sharedPreferences)
Does read the selection state for the feature type from the shared preferences. |
protected String |
getUUID(SharedPreferences sharedPreferences)
Does read the UUID from the shared preferences. |
private long |
getWindowSize(SharedPreferences sharedPreferences)
Does read the current cut-out size from the shared preferences. |
protected void |
onActivationStateChange(boolean active)
Handler for activation state changes |
void |
onBetaPreferenceChange(double beta)
The handler for beta value preference changes. |
void |
onBWCutOffPreferenceChanged(double cutOff)
The handler for Butterworth filter cut-off frequency preference changes. |
void |
onBWFilterOrderPreferenceChanged(int order)
The handler for Butterworth filter order changes. |
void |
onClassSelectionChange(Long[] selectedClasses)
The handler for changes of the class selection. |
void |
onCountDownTimeChange(long countDownTime)
The handler for count-down time parameter changes. |
void |
onCrossValidationParameterKChange(int parameterK)
The handler for changes of the parameter k for cross validation. |
void |
onDefaultRecordingTimeChange(long defaultRecordingTime)
The handler for default recording time parameter changes. |
void |
onEvaluationAccuracyThresholdChanged(int threshold)
The handler for changes of the parameter k for cross validation. |
void |
onFeatureSelection(FeatureTypes featureType,
boolean isSelected)
The handler for feature selection state changes. |
void |
onGravitationCutOffPreferenceChanged(double cutOff)
The handler for gravitation filter cut-off frequency preference changes. |
void |
onKNNClassifierParameterKChange(int parameterK)
The handler for changes of the parameter k for the nearest neighbor classifier (knn). |
void |
onKNNClassifierParameterNormalizeChange(boolean normalize)
The handler for changes of the parameter normalize for the nearest neighbor classifier (knn). |
void |
onLimitViolation(String message,
String key)
Does notify for a limit violation by a user preference change. |
void |
onLocationDataUsageFlagChange(boolean newUsage)
The handler for changes of location data usage flag |
void |
onMaximumRecordingTimeChange(int maximumRecordingTime)
The handler for maximum recording time parameter changes. |
void |
onMaximumSampleRateChange(long maxSampleRate)
The handler for maximum sample rate changes. |
void |
onMinCutOffPreferenceChanged(double minCutOff)
The handler for minimum cut-off frequency preference changes. |
void |
onOverlapSizeChange(int overlapSize)
The handler for cutOut overlap size parameter changes. |
void |
onOwnLinAccImplementationUsageFlagChange(boolean newUsage)
The handler for changes of the internal linear acceleration implementation usage flag. |
void |
onSampleRateChange(long sampleRate)
The handler for sample rate changes. |
void |
onSelectedAccFilterChanged(FilterTypes filterType)
The handler for filter type changes. |
void |
onSelectedClassifierChange(ClassifierTypes classifierType)
The handler for changes of the selected classifier. |
void |
onWindowSizeChange(long windowSize)
The handler for cutOut size parameter changes. |
private Configuration |
readCurrentConfig()
|
void |
register(SharedPreferenceChangeNotificationReceiver observer)
Method to register for shared preference change notifications. |
private void |
resetPreferenceValue(int keyConstant,
double value)
Does reset a stored shared double preference value and notifies for limit violation. |
private void |
resetPreferenceValue(int keyConstant,
int value)
Does reset a stored shared integer preference value and notifies for limit violation. |
private void |
resetPreferenceValue(int keyConstant,
long value)
Does reset a stored shared long preference value and notifies for limit violation. |
private void |
resetPreferenceValue(int keyConstant,
String value)
Does reset a stored shared string preference value and notifies for limit violation. |
void |
unregister(SharedPreferenceChangeNotificationReceiver observer)
Method to unregister for shared preference change notifications. |
void |
updateCurrentConfig(Configuration config)
|
void |
updatePreferenceValue(int keyConstant,
boolean value)
Does reset a stored shared boolean preference value and notifies for limit violation. |
protected void |
updateSelectedFeatures(boolean useLocationFeatures)
Method to update selected features according to the location feature usage flag |
boolean |
updateSelectedFeatures(FeatureTypes[] featureTypes)
Method to update the selected features |
private void |
writeBeta(SharedPreferences sharedPreferences,
double beta)
Does write the current beta value to the shared preferences. |
private void |
writeBWCutOffFrequency(SharedPreferences sharedPreferences,
double cutOffFrequency)
Does write the Butterworth cut-off frequency value to the shared preferences. |
private void |
writeBWFilterOrder(SharedPreferences sharedPreferences,
int order)
Does write the new Butterworth filter order value to the shared preferences. |
private void |
writeCountDownTime(SharedPreferences sharedPreferences,
long countDownTime)
Does write the current count-down time to the shared preferences. |
private void |
writeEvaluationAccuracyThreshold(SharedPreferences sharedPreferences,
int evalAccuracyThreshold)
Does write the accuracy threshold for evaluation to the shared preferences. |
private void |
writeFilterType(SharedPreferences sharedPreferences,
FilterTypes filterType)
Does write the filter type to the shared preferences. |
private void |
writeGravitationCutOffFrequency(SharedPreferences sharedPreferences,
double cutOffFrequency)
Does write the gravitation filter cut-off frequency value to the shared preferences. |
private void |
writeLocationDataUsageFlag(SharedPreferences sharedPreferences,
boolean isUseLocationData)
Does write the location data usage flag to the shared preferences. |
private void |
writeMaximumRecordingTime(SharedPreferences sharedPreferences,
int maximumRecordingTime)
Does write the maximum recording time to the shared preferences. |
private void |
writeMinCutOffFrequency(SharedPreferences sharedPreferences,
double minCutOffFrequency)
Does write the current minimum cut-off frequency value to the shared preferences. |
private void |
writeOverlapSize(SharedPreferences sharedPreferences,
int windowOverlap)
Does write the current cutOut overlap size to the shared preferences. |
private void |
writeOwnAccImplUsageFlag(SharedPreferences sharedPreferences,
boolean useOwnLinAcc)
Does write the usage flag for the internal linear accelerometer implementation to the shared preferences. |
private void |
writeParameterKForKNN(SharedPreferences sharedPreferences,
int parameterKForKNN)
Does write the parameter k for the nearest neighbor classifier to the shared preferences. |
private void |
writeParameterNormalizeForKNN(SharedPreferences sharedPreferences,
boolean parameterNormalizeForKNN)
Does write the KNN parameter for normalization to the shared preferences. |
private void |
writeParamterKForCrossValidation(SharedPreferences sharedPreferences,
int crossValidationK)
Does write the parameter k for cross validation to the shared preferences. |
void |
writePreferenceValue(SharedPreferences sharedPreferences,
int keyId,
boolean value)
Setter for boolean preference values |
private void |
writePreferenceValue(SharedPreferences sharedPreferences,
int keyId,
double value)
Setter for double preference values |
private void |
writePreferenceValue(SharedPreferences sharedPreferences,
int keyId,
int value)
Getter for integer preference values |
private void |
writePreferenceValue(SharedPreferences sharedPreferences,
int keyId,
long value)
Setter for long preference values |
private void |
writePreferenceValue(SharedPreferences sharedPreferences,
int keyId,
String sValue)
Setter for string preference values |
private void |
writeRecordingTime(SharedPreferences sharedPreferences,
long recordingTime)
Does write the current recording time to the shared preferences. |
private void |
writeSampleRate(SharedPreferences sharedPreferences,
long sampleRate)
Does write the current sample rate to the shared preferences. |
private void |
writeSelectedClasses(SharedPreferences sharedPreferences,
Set<Long> selectedClasses)
Does write the selected classes to the shared preferences. |
protected void |
writeSelectedClassifierType(SharedPreferences sharedPreferences,
ClassifierTypes type)
Does write the classifier type to the shared preferences. |
private void |
writeUUID(SharedPreferences sharedPreferences,
String uuid)
Does write the UUID to the shared preferences. |
private void |
writeWindowSize(SharedPreferences sharedPreferences,
long windowSize)
Does write the current cut-out size to the shared preferences. |
Methods inherited from class org.android.activityminer.logic.util.AbstractActivatableComponentImpl |
---|
isActive, setActivationState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ConcurrentLinkedQueue<SharedPreferenceChangeNotificationReceiver> observers
private final SharedPreferences.OnSharedPreferenceChangeListener prefListener
private final Context context
private Configuration currentConfig
private final SharedPreferences preferences
private static GlobalSharedPreferenceObserver instance
private final SparseArray<String> mapKeyToViolationMessage
Constructor Detail |
---|
private GlobalSharedPreferenceObserver(Context applicationContext)
applicationContext
- the application contextMethod Detail |
---|
public static final GlobalSharedPreferenceObserver getInstance(Context applicationContext)
applicationContext
- the application context
private final Configuration readCurrentConfig()
public final void updateCurrentConfig(Configuration config)
config
- the new configurationprivate final int getPreferenceValue(SharedPreferences sharedPreferences, int keyId, int defaultValue)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifierdefaultValue
- the default value
private final long getPreferenceValue(SharedPreferences sharedPreferences, int keyId, long defaultValue)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifierdefaultValue
- the default value
private final double getPreferenceValue(SharedPreferences sharedPreferences, int keyId, double defaultValue)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifierdefaultValue
- the default value
private final void writePreferenceValue(SharedPreferences sharedPreferences, int keyId, int value)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifiervalue
- the valueprivate final void writePreferenceValue(SharedPreferences sharedPreferences, int keyId, long value)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifiervalue
- the valueprivate final void writePreferenceValue(SharedPreferences sharedPreferences, int keyId, double value)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifiervalue
- the valuepublic final void writePreferenceValue(SharedPreferences sharedPreferences, int keyId, boolean value)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifiervalue
- the valueprivate final void writePreferenceValue(SharedPreferences sharedPreferences, int keyId, String sValue)
sharedPreferences
- the shared preference instance to usekeyId
- the key identifiersValue
- the valueprivate Long[] getSelectedClasses(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private void writeSelectedClasses(SharedPreferences sharedPreferences, Set<Long> selectedClasses)
sharedPreferences
- the shared preference instanceselectedClasses
- the selected classes to write to preferrencesprivate final FilterTypes getFilterType(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeFilterType(SharedPreferences sharedPreferences, FilterTypes filterType)
sharedPreferences
- the shared preference instancefilterType
- the filter typeprivate final double getGravitationCutOffFrequency(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeGravitationCutOffFrequency(SharedPreferences sharedPreferences, double cutOffFrequency)
sharedPreferences
- the shared preference instancecutOffFrequency
- the new gravitation filter cut-off frequency valueprivate final double getBWCutOffFrequency(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeBWCutOffFrequency(SharedPreferences sharedPreferences, double cutOffFrequency)
sharedPreferences
- the shared preference instancecutOffFrequency
- the new Butterworth cut-off frequency valueprivate final int getBWFilterOrder(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeBWFilterOrder(SharedPreferences sharedPreferences, int order)
sharedPreferences
- the shared preference instanceorder
- the new Butterworth filter orderprivate final double getMinCutOffFrequency(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeMinCutOffFrequency(SharedPreferences sharedPreferences, double minCutOffFrequency)
sharedPreferences
- the shared preference instanceminCutOffFrequency
- the current minimum cut-off frequency valueprivate final double getBeta(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeBeta(SharedPreferences sharedPreferences, double beta)
sharedPreferences
- the shared preference instancebeta
- the current beta valueprivate final boolean getSelectionState(FeatureTypes featureType, SharedPreferences sharedPreferences)
featureType
- the feature typesharedPreferences
- the shared preference instance
protected long getCountDownTime(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private void writeCountDownTime(SharedPreferences sharedPreferences, long countDownTime)
sharedPreferences
- the shared preference instancecountDownTime
- the count-down timeprotected long getRecordingTime(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final int getMaximumRecordingTime(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeRecordingTime(SharedPreferences sharedPreferences, long recordingTime)
sharedPreferences
- the shared preference instancerecordingTime
- the recording timeprivate final void writeMaximumRecordingTime(SharedPreferences sharedPreferences, int maximumRecordingTime)
sharedPreferences
- the shared preference instancemaximumRecordingTime
- the maximum recording timeprotected final long getSampleRate(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeSampleRate(SharedPreferences sharedPreferences, long sampleRate)
sharedPreferences
- the shared preference instancesampleRate
- the sample rate in milliseconds between samplesprotected final long getMaximumSampleRate(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
protected final int getParamterKForCrossValidation(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeParamterKForCrossValidation(SharedPreferences sharedPreferences, int crossValidationK)
sharedPreferences
- the shared preference instancecrossValidationK
- the parameter k for cross validationprivate int getEvaluationAccuracyThreshold(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeEvaluationAccuracyThreshold(SharedPreferences sharedPreferences, int evalAccuracyThreshold)
sharedPreferences
- the shared preference instanceevalAccuracyThreshold
- sharedPreferencesprivate final int getParameterKForKNN(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeParameterKForKNN(SharedPreferences sharedPreferences, int parameterKForKNN)
sharedPreferences
- the shared preference instanceparameterKForKNN
- the parameter k for KNNprotected final boolean getLocationDataUsageFlag(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private boolean getOwnAccImplUsageFlag(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
protected final String getUUID(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeUUID(SharedPreferences sharedPreferences, String uuid)
sharedPreferences
- the shared preference instanceuuid
- the uuidprivate final void writeLocationDataUsageFlag(SharedPreferences sharedPreferences, boolean isUseLocationData)
sharedPreferences
- the shared preference instanceisUseLocationData
- the location data usage flagprivate void writeOwnAccImplUsageFlag(SharedPreferences sharedPreferences, boolean useOwnLinAcc)
sharedPreferences
- the shared preference instanceuseOwnLinAcc
- the internal linear accelerometer implementation usage flagprotected final boolean getParameterNormalizeForKNN(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeParameterNormalizeForKNN(SharedPreferences sharedPreferences, boolean parameterNormalizeForKNN)
sharedPreferences
- the shared preference instanceparameterNormalizeForKNN
- the KNN parameter for normalizationprivate final int getOverlapSize(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeOverlapSize(SharedPreferences sharedPreferences, int windowOverlap)
sharedPreferences
- the shared preference instancewindowOverlap
- the overlap sizeprivate final long getWindowSize(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
private final void writeWindowSize(SharedPreferences sharedPreferences, long windowSize)
sharedPreferences
- the shared preference instancewindowSize
- the cutOut sizeprotected final ClassifierTypes getSelectedClassifierType(SharedPreferences sharedPreferences)
sharedPreferences
- the shared preference instance
protected final void writeSelectedClassifierType(SharedPreferences sharedPreferences, ClassifierTypes type)
sharedPreferences
- the shared preference instancetype
- the classifier typepublic final Configuration getConfiguration()
public final void register(SharedPreferenceChangeNotificationReceiver observer)
observer
- the observer to registerpublic final void unregister(SharedPreferenceChangeNotificationReceiver observer)
observer
- the observer to registerprotected final void onActivationStateChange(boolean active)
AbstractActivatableComponentImpl
onActivationStateChange
in class AbstractActivatableComponentImpl
active
- the new activation stateprivate final void resetPreferenceValue(int keyConstant, String value)
value
- the string valuekeyConstant
- the key constantprivate final void resetPreferenceValue(int keyConstant, int value)
value
- the integer valuekeyConstant
- the key constantprivate final void resetPreferenceValue(int keyConstant, long value)
value
- the double valuekeyConstant
- the key constantprivate final void resetPreferenceValue(int keyConstant, double value)
value
- the double valuekeyConstant
- the key constantpublic final void updatePreferenceValue(int keyConstant, boolean value)
value
- the boolean valuekeyConstant
- the key constantpublic final void onSelectedAccFilterChanged(FilterTypes filterType)
SharedPreferenceChangeObserver
onSelectedAccFilterChanged
in interface SharedPreferenceChangeObserver
filterType
- the filterTypepublic void onGravitationCutOffPreferenceChanged(double cutOff)
SharedPreferenceChangeObserver
onGravitationCutOffPreferenceChanged
in interface SharedPreferenceChangeObserver
cutOff
- the new cut-off frequency valuepublic void onBWCutOffPreferenceChanged(double cutOff)
SharedPreferenceChangeObserver
onBWCutOffPreferenceChanged
in interface SharedPreferenceChangeObserver
cutOff
- the new cut-off frequency valuepublic void onBWFilterOrderPreferenceChanged(int order)
SharedPreferenceChangeObserver
onBWFilterOrderPreferenceChanged
in interface SharedPreferenceChangeObserver
order
- the new filter orderpublic final void onMinCutOffPreferenceChanged(double minCutOff)
SharedPreferenceChangeObserver
onMinCutOffPreferenceChanged
in interface SharedPreferenceChangeObserver
minCutOff
- the new minimum cut-off frequency valuepublic final void onBetaPreferenceChange(double beta)
SharedPreferenceChangeObserver
onBetaPreferenceChange
in interface SharedPreferenceChangeObserver
beta
- the new beta valuepublic final void onFeatureSelection(FeatureTypes featureType, boolean isSelected)
SharedPreferenceChangeObserver
onFeatureSelection
in interface SharedPreferenceChangeObserver
featureType
- the feature type identifierisSelected
- the selection statepublic final void onClassSelectionChange(Long[] selectedClasses)
SharedPreferenceChangeObserver
onClassSelectionChange
in interface SharedPreferenceChangeObserver
selectedClasses
- the actual class selectionpublic final void onOverlapSizeChange(int overlapSize)
SharedPreferenceChangeObserver
onOverlapSizeChange
in interface SharedPreferenceChangeObserver
overlapSize
- the new overlap sizepublic final void onWindowSizeChange(long windowSize)
SharedPreferenceChangeObserver
onWindowSizeChange
in interface SharedPreferenceChangeObserver
windowSize
- the new cutOut sizepublic final void onCountDownTimeChange(long countDownTime)
SharedPreferenceChangeObserver
onCountDownTimeChange
in interface SharedPreferenceChangeObserver
countDownTime
- the new count-down time sizepublic final void onDefaultRecordingTimeChange(long defaultRecordingTime)
SharedPreferenceChangeObserver
onDefaultRecordingTimeChange
in interface SharedPreferenceChangeObserver
defaultRecordingTime
- the new default recording time in secondspublic void onMaximumRecordingTimeChange(int maximumRecordingTime)
SharedPreferenceChangeObserver
onMaximumRecordingTimeChange
in interface SharedPreferenceChangeObserver
maximumRecordingTime
- the new default maximum time in secondspublic final void onSampleRateChange(long sampleRate)
SharedPreferenceChangeObserver
onSampleRateChange
in interface SharedPreferenceChangeObserver
sampleRate
- the new sample rate as the milliseconds between two samplespublic final void onMaximumSampleRateChange(long maxSampleRate)
SharedPreferenceChangeObserver
onMaximumSampleRateChange
in interface SharedPreferenceChangeObserver
maxSampleRate
- the new maximum sample rate as the milliseconds between two
samplespublic final void onCrossValidationParameterKChange(int parameterK)
SharedPreferenceChangeObserver
onCrossValidationParameterKChange
in interface SharedPreferenceChangeObserver
parameterK
- the new parameter k for cross validationpublic void onEvaluationAccuracyThresholdChanged(int threshold)
SharedPreferenceChangeObserver
onEvaluationAccuracyThresholdChanged
in interface SharedPreferenceChangeObserver
threshold
- the accuracy threshold for evaluationpublic final void onKNNClassifierParameterKChange(int parameterK)
SharedPreferenceChangeObserver
onKNNClassifierParameterKChange
in interface SharedPreferenceChangeObserver
parameterK
- the new parameter valuepublic void onKNNClassifierParameterNormalizeChange(boolean normalize)
SharedPreferenceChangeObserver
onKNNClassifierParameterNormalizeChange
in interface SharedPreferenceChangeObserver
normalize
- the new normalize flag valuepublic final void onLocationDataUsageFlagChange(boolean newUsage)
SharedPreferenceChangeObserver
onLocationDataUsageFlagChange
in interface SharedPreferenceChangeObserver
newUsage
- the new location data usage flagpublic final void onOwnLinAccImplementationUsageFlagChange(boolean newUsage)
SharedPreferenceChangeObserver
onOwnLinAccImplementationUsageFlagChange
in interface SharedPreferenceChangeObserver
newUsage
- the internal linear acceleration implementation usage flagprotected final void updateSelectedFeatures(boolean useLocationFeatures)
useLocationFeatures
- flag if location features are availablepublic final boolean addToSelectedFeatures(FeatureTypes[] featureTypes)
featureTypes
- the feature types to add to selection
public final boolean updateSelectedFeatures(FeatureTypes[] featureTypes)
featureTypes
- the feature types to set as selection
public final void onSelectedClassifierChange(ClassifierTypes classifierType)
SharedPreferenceChangeObserver
onSelectedClassifierChange
in interface SharedPreferenceChangeObserver
classifierType
- the type of the new selected classifierpublic final void onLimitViolation(String message, String key)
SharedPreferenceChangeObserver
onLimitViolation
in interface SharedPreferenceChangeObserver
message
- the violation messagekey
- the shared preference key, which value have been reset due to
limit violation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |