diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-10 20:27:34 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-10 20:27:34 +0200 |
commit | 1abae04cda368409b54c7b3d0b3b8401040ef39e (patch) | |
tree | b8c2a0900f42873ac5cd9f9711d5eea63928bc7e | |
parent | 65fd0de7e100fed42a6b2e52e994d7a0d6371037 (diff) | |
download | open-keychain-1abae04cda368409b54c7b3d0b3b8401040ef39e.tar.gz open-keychain-1abae04cda368409b54c7b3d0b3b8401040ef39e.tar.bz2 open-keychain-1abae04cda368409b54c7b3d0b3b8401040ef39e.zip |
Fix compression setting for encryption of files
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java index 94f828b48..ab26d539a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java @@ -264,24 +264,27 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn // fill values for this action Bundle data = new Bundle(); + int compressionId; if (isContentMessage()) { data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_BYTES); data.putByteArray(KeychainIntentService.ENCRYPT_MESSAGE_BYTES, mMessage.getBytes()); + + compressionId = Preferences.getPreferences(this).getDefaultMessageCompression(); } else { data.putInt(KeychainIntentService.SOURCE, KeychainIntentService.IO_URIS); data.putParcelableArrayList(KeychainIntentService.ENCRYPT_INPUT_URIS, mInputUris); data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_URIS); data.putParcelableArrayList(KeychainIntentService.ENCRYPT_OUTPUT_URIS, mOutputUris); + + compressionId = Preferences.getPreferences(this).getDefaultFileCompression(); } + data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId); + // Always use armor for messages data.putBoolean(KeychainIntentService.ENCRYPT_USE_ASCII_ARMOR, mUseArmor || isContentMessage()); - // TODO: Only default compression right now... - int compressionId = Preferences.getPreferences(this).getDefaultMessageCompression(); - data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId); - if (isModeSymmetric()) { Log.d(Constants.TAG, "Symmetric encryption enabled!"); String passphrase = mPassphrase; |