Exemplo n.º 1
0
 public boolean onPreferenceChange(Preference preference, Object value) {
   Utilities.log(
       Constants.LOG_TITLE,
       LOG_SUBTITLE,
       "Preference '"
           + preference.getKey()
           + "' changed. New value is '"
           + value.toString()
           + "'");
   SharedPreferences.Editor editor = Constants.getPreferences(this).edit();
   if (preference.getKey().equals(Constants.MOUNT_ON_BOOT_PREFERENCE_KEY)) {
     editor.putBoolean(preference.getKey(), (Boolean) value);
   }
   editor.commit();
   return true;
 }
Exemplo n.º 2
0
 public void onDestroy() {
   super.onDestroy();
   Utilities.log(Constants.LOG_TITLE, LOG_SUBTITLE, "Class destroyed");
 }
Exemplo n.º 3
0
 public void onCreate(Bundle saved_instance_bundle) {
   super.onCreate(saved_instance_bundle);
   addPreferencesFromResource(R.xml.preferences);
   findPreference(Constants.MOUNT_ON_BOOT_PREFERENCE_KEY).setOnPreferenceChangeListener(this);
   Utilities.log(Constants.LOG_TITLE, LOG_SUBTITLE, "Class created");
 }