aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SettingsActivity.java14
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java6
-rw-r--r--OpenKeychain/src/main/res/xml/passphrase_preferences.xml1
3 files changed, 1 insertions, 20 deletions
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);
}
diff --git a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml
index fa801ed8b..b9696492a 100644
--- a/OpenKeychain/src/main/res/xml/passphrase_preferences.xml
+++ b/OpenKeychain/src/main/res/xml/passphrase_preferences.xml
@@ -4,6 +4,7 @@
android:key="passphraseCacheTtls"
android:title="@string/label_passphrase_cache_ttl" />
<SwitchPreference
+ android:defaultValue="false"
android:key="passphraseCacheSubs"
android:title="@string/label_passphrase_cache_subs" />
<SwitchPreference