mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
Fix compression setting for encryption of files
This commit is contained in:
parent
65fd0de7e1
commit
1abae04cda
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user