From 2ab55b6767abd516ef86a6289d50ffe4bff2703a Mon Sep 17 00:00:00 2001 From: Andrea Torlaschi Date: Tue, 17 May 2016 17:09:03 +0200 Subject: Settings: remove unuseful initialization --- .../sufficientlysecure/keychain/ui/SettingsActivity.java | 14 -------------- .../org/sufficientlysecure/keychain/util/Preferences.java | 6 ------ 2 files changed, 20 deletions(-) (limited to 'OpenKeychain/src/main/java/org') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java index e71846577..894ce7846 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java @@ -210,9 +210,6 @@ public class SettingsActivity extends AppCompatPreferenceActivity { return false; } }); - - initializePassphraseCacheSubs( - (SwitchPreference) findPreference(Constants.Pref.PASSPHRASE_CACHE_SUBS)); } } @@ -590,15 +587,4 @@ public class SettingsActivity extends AppCompatPreferenceActivity { || ExperimentalPrefsFragment.class.getName().equals(fragmentName) || super.isValidFragment(fragmentName); } - - private static void initializePassphraseCacheSubs(final SwitchPreference mPassphraseCacheSubs) { - mPassphraseCacheSubs.setChecked(sPreferences.getPassphraseCacheSubs()); - mPassphraseCacheSubs.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { - public boolean onPreferenceChange(Preference preference, Object newValue) { - mPassphraseCacheSubs.setChecked((Boolean) newValue); - sPreferences.setPassphraseCacheSubs((Boolean) newValue); - return false; - } - }); - } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java index 2abd53f62..7ca2875ea 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java @@ -107,12 +107,6 @@ public class Preferences { return mSharedPreferences.getBoolean(Pref.PASSPHRASE_CACHE_SUBS, false); } - public void setPassphraseCacheSubs(boolean value) { - SharedPreferences.Editor editor = mSharedPreferences.edit(); - editor.putBoolean(Pref.PASSPHRASE_CACHE_SUBS, value); - editor.commit(); - } - public boolean getCachedConsolidate() { return mSharedPreferences.getBoolean(Pref.CACHED_CONSOLIDATE, false); } -- cgit v1.2.3