From 1a8606f194ec0a4ba54abb49f7e679e9283f6a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Thu, 14 Aug 2014 13:08:39 +0200 Subject: API: Return metadata only for v4 api clients --- .../org/sufficientlysecure/keychain/remote/OpenPgpService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenKeychain/src/main/java/org') 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 3c2f7ebda..fd616f0cd 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -428,9 +428,11 @@ public class OpenPgpService extends RemoteService { } } - OpenPgpMetadata metadata = decryptVerifyResult.getDecryptMetadata(); - if (metadata != null) { - result.putExtra(OpenPgpApi.RESULT_METADATA, metadata); + if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) == 4) { + OpenPgpMetadata metadata = decryptVerifyResult.getDecryptMetadata(); + if (metadata != null) { + result.putExtra(OpenPgpApi.RESULT_METADATA, metadata); + } } } finally { -- cgit v1.2.3