mime: respect charset header (default to utf-8)

This commit is contained in:
Vincent Breitmoser
2015-09-16 19:54:57 +02:00
parent ece06b1933
commit 6624d1f830
7 changed files with 21 additions and 25 deletions

View File

@@ -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);
}