diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-06 23:39:26 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-06 23:40:22 +0200 |
commit | b779211f55a126d54c643fb9f13a0a17b46c37bf (patch) | |
tree | a526af2e5d385691c20393560443e17f9a61201a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java | |
parent | fa614383065a22269c5ca249819c46b82e20a194 (diff) | |
parent | 7cfc0d80d0b4318ce1ae027536d70c2cda4c8605 (diff) | |
download | open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.tar.gz open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.tar.bz2 open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.zip |
Merge branch 'master' into v/multi-decrypt
this also fixes weird-bug
Conflicts:
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java
OpenKeychain/src/main/res/values/strings.xml
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/Preferences.java')
-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), |