diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-16 19:54:57 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-16 19:54:57 +0200 |
commit | 6624d1f8304a07ac43e7f22a138262bba9782758 (patch) | |
tree | 6e37299002a48c0264cfd6b19a19249b2790dfd8 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote | |
parent | ece06b1933c26688d2eb6b7fa8657acbb8833728 (diff) | |
download | open-keychain-6624d1f8304a07ac43e7f22a138262bba9782758.tar.gz open-keychain-6624d1f8304a07ac43e7f22a138262bba9782758.tar.bz2 open-keychain-6624d1f8304a07ac43e7f22a138262bba9782758.zip |
mime: respect charset header (default to utf-8)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java index 57dd068ef..e7709e58e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -628,15 +628,14 @@ public class OpenPgpService extends RemoteService { } } - + OpenPgpMetadata metadata = pgpResult.getDecryptionMetadata(); if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) >= 4) { - OpenPgpMetadata metadata = pgpResult.getDecryptionMetadata(); if (metadata != null) { result.putExtra(OpenPgpApi.RESULT_METADATA, metadata); } } - String charset = pgpResult.getCharset(); + String charset = metadata != null ? metadata.getCharset() : null; if (charset != null) { result.putExtra(OpenPgpApi.RESULT_CHARSET, charset); } |