mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 16:38:50 -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
|
// fill values for this action
|
||||||
Bundle data = new Bundle();
|
Bundle data = new Bundle();
|
||||||
|
|
||||||
|
int compressionId;
|
||||||
if (isContentMessage()) {
|
if (isContentMessage()) {
|
||||||
data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_BYTES);
|
data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_BYTES);
|
||||||
data.putByteArray(KeychainIntentService.ENCRYPT_MESSAGE_BYTES, mMessage.getBytes());
|
data.putByteArray(KeychainIntentService.ENCRYPT_MESSAGE_BYTES, mMessage.getBytes());
|
||||||
|
|
||||||
|
compressionId = Preferences.getPreferences(this).getDefaultMessageCompression();
|
||||||
} else {
|
} else {
|
||||||
data.putInt(KeychainIntentService.SOURCE, KeychainIntentService.IO_URIS);
|
data.putInt(KeychainIntentService.SOURCE, KeychainIntentService.IO_URIS);
|
||||||
data.putParcelableArrayList(KeychainIntentService.ENCRYPT_INPUT_URIS, mInputUris);
|
data.putParcelableArrayList(KeychainIntentService.ENCRYPT_INPUT_URIS, mInputUris);
|
||||||
|
|
||||||
data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_URIS);
|
data.putInt(KeychainIntentService.TARGET, KeychainIntentService.IO_URIS);
|
||||||
data.putParcelableArrayList(KeychainIntentService.ENCRYPT_OUTPUT_URIS, mOutputUris);
|
data.putParcelableArrayList(KeychainIntentService.ENCRYPT_OUTPUT_URIS, mOutputUris);
|
||||||
|
|
||||||
|
compressionId = Preferences.getPreferences(this).getDefaultFileCompression();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId);
|
||||||
|
|
||||||
// Always use armor for messages
|
// Always use armor for messages
|
||||||
data.putBoolean(KeychainIntentService.ENCRYPT_USE_ASCII_ARMOR, mUseArmor || isContentMessage());
|
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()) {
|
if (isModeSymmetric()) {
|
||||||
Log.d(Constants.TAG, "Symmetric encryption enabled!");
|
Log.d(Constants.TAG, "Symmetric encryption enabled!");
|
||||||
String passphrase = mPassphrase;
|
String passphrase = mPassphrase;
|
||||||
|
Loading…
Reference in New Issue
Block a user