org.android.activityminer.app
Class ActivityMinerPreferencesActivity

Package class diagram package ActivityMinerPreferencesActivity
java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by android.app.ListActivity
                      extended by android.preference.PreferenceActivity
                          extended by org.android.activityminer.app.util.SharedPreferenceChangeAwarePreferenceActivity
                              extended by org.android.activityminer.app.evaluation.EvaluationPreferencesActivity
                                  extended by org.android.activityminer.app.ActivityMinerPreferencesActivity
All Implemented Interfaces:
ComponentCallbacks, ComponentCallbacks2, PreferenceFragment.OnPreferenceStartFragmentCallback, KeyEvent.Callback, LayoutInflater.Factory, LayoutInflater.Factory2, View.OnCreateContextMenuListener, Window.Callback, EventObserver<TaskFinishedEvent>, SharedPreferenceChangeNotificationReceiver, SharedPreferenceChangeObserver

public class ActivityMinerPreferencesActivity
extends EvaluationPreferencesActivity
implements EventObserver<TaskFinishedEvent>

The main preferences activity.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.preference.PreferenceActivity
PreferenceActivity.Header
 
Field Summary
private  PreferenceCategory categoryApplicationPreference
          The preference category for application settings.
private  int clickCount
          The click count for the super user preferences
private  EditTextPreference editWindowSize
          The cutOut size edit preference.
private  ListPreference frequencyTypes
          The list preference for the frequency types
private  PreferenceScreen sampleRatePrefScreen
          The preference screen for the sample rate
private static int SUPER_USER_CLICK_COUNT
          The count of clicks to enable super user preferences,
 
Fields inherited from class android.preference.PreferenceActivity
EXTRA_NO_HEADERS, EXTRA_SHOW_FRAGMENT, EXTRA_SHOW_FRAGMENT_ARGUMENTS, EXTRA_SHOW_FRAGMENT_SHORT_TITLE, EXTRA_SHOW_FRAGMENT_TITLE, HEADER_ID_UNDEFINED
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAPTIONING_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
 
Constructor Summary
ActivityMinerPreferencesActivity()
           
 
Method Summary
private  void addFeatureExtractionPreferenceScreen(PreferenceScreen root)
          Does create the cutOut preferences for feature extraction.
private  void addGeneralPreferenceScreen(PreferenceScreen root)
          Does add the general information category
protected  void addLocationDataUsageFlag()
          Does add the location data usage flag to the application category.
protected  void addOnCLickEventToMaximumSampleRatePreferenceScreen()
          Does add the on click event to the maximum sample preference in the application category.
protected  void addOwnLinAccImplPreference()
          Does add the special own linear acceleration enable flag preference to the application category.
protected  void addSuperUserFeatures()
          Method to add the super user features.
protected  void onCreate(Bundle savedInstanceState)
           
 void onEvent(ObservableEventSource<? extends TaskFinishedEvent> eventSource, TaskFinishedEvent observedEvent)
           
 void onLimitViolation(String message, String key)
          Does notify for a limit violation by a user preference change.
 void onOwnLinAccImplementationUsageFlagChange(boolean useInternalLinAccImpl)
          The handler for changes of the internal linear acceleration implementation usage flag.
private  void updateFrequencies()
          Does update the selectable frequencies.
private  void updateSampleRatePreferenceScreen()
          Does update the summary of the sample rate preference screen with the current configuration.
 void updateWindowSizePreferenceSummary()
          Does update the window size preference summary.
 
Methods inherited from class org.android.activityminer.app.evaluation.EvaluationPreferencesActivity
onLocationDataUsageFlagChange
 
Methods inherited from class org.android.activityminer.app.util.SharedPreferenceChangeAwarePreferenceActivity
getConfiguration, isInterestedInLimitViolations, onBetaPreferenceChange, onBWCutOffPreferenceChanged, onBWFilterOrderPreferenceChanged, onClassSelectionChange, onCountDownTimeChange, onCrossValidationParameterKChange, onDefaultRecordingTimeChange, onDestroy, onEvaluationAccuracyThresholdChanged, onFeatureSelection, onGravitationCutOffPreferenceChanged, onKNNClassifierParameterKChange, onKNNClassifierParameterNormalizeChange, onMaximumRecordingTimeChange, onMaximumSampleRateChange, onMinCutOffPreferenceChanged, onOverlapSizeChange, onPause, onResume, onSampleRateChange, onSelectedAccFilterChanged, onSelectedClassifierChange, onWindowSizeChange, updateCheckBoxPreference, updateTextPreference
 
Methods inherited from class android.preference.PreferenceActivity
addPreferencesFromIntent, addPreferencesFromResource, findPreference, finishPreferencePanel, getPreferenceManager, getPreferenceScreen, hasHeaders, invalidateHeaders, isMultiPane, isValidFragment, loadHeadersFromResource, onActivityResult, onBuildHeaders, onBuildStartFragmentIntent, onContentChanged, onGetInitialHeader, onGetNewHeader, onHeaderClick, onIsHidingHeaders, onIsMultiPane, onListItemClick, onNewIntent, onPreferenceStartFragment, onPreferenceTreeClick, onRestoreInstanceState, onSaveInstanceState, onStop, setListFooter, setParentTitle, setPreferenceScreen, showBreadCrumbs, startPreferenceFragment, startPreferencePanel, startWithFragment, startWithFragment, switchToHeader, switchToHeader
 
Methods inherited from class android.app.ListActivity
getListAdapter, getListView, getSelectedItemId, getSelectedItemPosition, setListAdapter, setSelection
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistData, onRestart, onRetainNonConfigurationInstance, onSearchRequested, onStart, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, recreate, registerForContextMenu, removeDialog, reportFullyDrawn, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, attachBaseContext, getResources, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clickCount

private int clickCount
The click count for the super user preferences


SUPER_USER_CLICK_COUNT

private static final int SUPER_USER_CLICK_COUNT
The count of clicks to enable super user preferences,

See Also:
Constant Field Values

sampleRatePrefScreen

private PreferenceScreen sampleRatePrefScreen
The preference screen for the sample rate


editWindowSize

private EditTextPreference editWindowSize
The cutOut size edit preference.


frequencyTypes

private ListPreference frequencyTypes
The list preference for the frequency types


categoryApplicationPreference

private PreferenceCategory categoryApplicationPreference
The preference category for application settings.

Constructor Detail

ActivityMinerPreferencesActivity

public ActivityMinerPreferencesActivity()
Method Detail

onCreate

protected final void onCreate(Bundle savedInstanceState)
Overrides:
onCreate in class EvaluationPreferencesActivity

addFeatureExtractionPreferenceScreen

private void addFeatureExtractionPreferenceScreen(PreferenceScreen root)
Does create the cutOut preferences for feature extraction.

Parameters:
root - the root screen

updateFrequencies

private void updateFrequencies()
Does update the selectable frequencies.


updateWindowSizePreferenceSummary

public void updateWindowSizePreferenceSummary()
Does update the window size preference summary.


addGeneralPreferenceScreen

private void addGeneralPreferenceScreen(PreferenceScreen root)
Does add the general information category

Parameters:
root - the root screen

addSuperUserFeatures

protected void addSuperUserFeatures()
Method to add the super user features.


addOnCLickEventToMaximumSampleRatePreferenceScreen

protected void addOnCLickEventToMaximumSampleRatePreferenceScreen()
Does add the on click event to the maximum sample preference in the application category.


addLocationDataUsageFlag

protected void addLocationDataUsageFlag()
Does add the location data usage flag to the application category.


addOwnLinAccImplPreference

protected void addOwnLinAccImplPreference()
Does add the special own linear acceleration enable flag preference to the application category.


updateSampleRatePreferenceScreen

private void updateSampleRatePreferenceScreen()
Does update the summary of the sample rate preference screen with the current configuration.


onOwnLinAccImplementationUsageFlagChange

public void onOwnLinAccImplementationUsageFlagChange(boolean useInternalLinAccImpl)
Description copied from interface: SharedPreferenceChangeObserver
The handler for changes of the internal linear acceleration implementation usage flag.

Specified by:
onOwnLinAccImplementationUsageFlagChange in interface SharedPreferenceChangeObserver
Overrides:
onOwnLinAccImplementationUsageFlagChange in class SharedPreferenceChangeAwarePreferenceActivity
Parameters:
useInternalLinAccImpl - the internal linear acceleration implementation usage flag

onLimitViolation

public final void onLimitViolation(String message,
                                   String key)
Description copied from interface: SharedPreferenceChangeObserver
Does notify for a limit violation by a user preference change.

Specified by:
onLimitViolation in interface SharedPreferenceChangeObserver
Overrides:
onLimitViolation in class EvaluationPreferencesActivity
Parameters:
message - the violation message
key - the shared preference key, which value have been reset due to limit violation

onEvent

public void onEvent(ObservableEventSource<? extends TaskFinishedEvent> eventSource,
                    TaskFinishedEvent observedEvent)
Specified by:
onEvent in interface EventObserver<TaskFinishedEvent>