diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-03 01:23:51 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-03 01:23:51 +0200 |
commit | 7cfc0d80d0b4318ce1ae027536d70c2cda4c8605 (patch) | |
tree | 5e000b4d388f441f6d39b9ea0d7059740b038aa0 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util | |
parent | bd5a5c013881c57d29d67a9d6de1618f45dbcb99 (diff) | |
parent | ecfbc743f312d37d0e3b9a5fae4e9db74a92d7e0 (diff) | |
download | open-keychain-7cfc0d80d0b4318ce1ae027536d70c2cda4c8605.tar.gz open-keychain-7cfc0d80d0b4318ce1ae027536d70c2cda4c8605.tar.bz2 open-keychain-7cfc0d80d0b4318ce1ae027536d70c2cda4c8605.zip |
Merge branch 'v/sticky-prefs'
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java | 42 |
1 files changed, 42 insertions, 0 deletions
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 303687315..f4c6f7f94 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java @@ -182,6 +182,48 @@ public class Preferences { editor.commit(); } + public void setFilesUseCompression(boolean compress) { + SharedPreferences.Editor editor = mSharedPreferences.edit(); + editor.putBoolean(Pref.FILE_USE_COMPRESSION, compress); + editor.commit(); + } + + public boolean getFilesUseCompression() { + return mSharedPreferences.getBoolean(Pref.FILE_USE_COMPRESSION, true); + } + + public void setTextUseCompression(boolean compress) { + SharedPreferences.Editor editor = mSharedPreferences.edit(); + editor.putBoolean(Pref.TEXT_USE_COMPRESSION, compress); + editor.commit(); + } + + public boolean getTextUseCompression() { + return mSharedPreferences.getBoolean(Pref.TEXT_USE_COMPRESSION, true); + } + + + + public void setUseArmor(boolean useArmor) { + SharedPreferences.Editor editor = mSharedPreferences.edit(); + editor.putBoolean(Pref.USE_ARMOR, useArmor); + editor.commit(); + } + + public boolean getUseArmor() { + return mSharedPreferences.getBoolean(Pref.USE_ARMOR, false); + } + + public void setEncryptFilenames(boolean encryptFilenames) { + SharedPreferences.Editor editor = mSharedPreferences.edit(); + editor.putBoolean(Pref.ENCRYPT_FILENAMES, encryptFilenames); + editor.commit(); + } + + public boolean getEncryptFilenames() { + return mSharedPreferences.getBoolean(Pref.ENCRYPT_FILENAMES, true); + } + public CloudSearchPrefs getCloudSearchPrefs() { return new CloudSearchPrefs(mSharedPreferences.getBoolean(Pref.SEARCH_KEYSERVER, true), mSharedPreferences.getBoolean(Pref.SEARCH_KEYBASE, true), |