From ec76d56b82dbfabf30d14eff44b1f995b062c148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Mon, 10 Aug 2015 14:18:15 +0200 Subject: Fix API backward compat --- .../org/sufficientlysecure/keychain/remote/OpenPgpService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java') 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 e1d7c0bc9..ff49a2991 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -583,13 +583,13 @@ public class OpenPgpService extends RemoteService { } } - if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) < 6) { - // RESULT_INVALID_INSECURE has been added in version 6, fallback to RESULT_INVALID_SIGNATURE + if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) < 8) { + // RESULT_INVALID_INSECURE has been added in version 8, fallback to RESULT_INVALID_SIGNATURE if (signatureResult.getResult() == OpenPgpSignatureResult.RESULT_INVALID_INSECURE) { signatureResult.setResult(OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE); } - // RESULT_NO_SIGNATURE has been added in version 6, before the signatureResult was null + // RESULT_NO_SIGNATURE has been added in version 8, before the signatureResult was null if (signatureResult.getResult() == OpenPgpSignatureResult.RESULT_NO_SIGNATURE) { result.putExtra(OpenPgpApi.RESULT_SIGNATURE, (Parcelable[]) null); } @@ -602,7 +602,7 @@ public class OpenPgpService extends RemoteService { } } - if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) >= 6) { + if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) >= 8) { OpenPgpDecryptionResult decryptionResult = pgpResult.getDecryptionResult(); if (decryptionResult != null) { result.putExtra(OpenPgpApi.RESULT_DECRYPTION, decryptionResult); -- cgit v1.2.3