diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-12 13:54:46 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-12 13:54:46 +0200 |
commit | a4a6314041ebd20b9945acf503817766c99473be (patch) | |
tree | 0748147684819598b797275b6ae441185acbbeb7 /OpenKeychain/src/main/java | |
parent | ae5e75f4e1e86831facc25fe97c1951b4a1aecee (diff) | |
download | open-keychain-a4a6314041ebd20b9945acf503817766c99473be.tar.gz open-keychain-a4a6314041ebd20b9945acf503817766c99473be.tar.bz2 open-keychain-a4a6314041ebd20b9945acf503817766c99473be.zip |
Fix API version support, update api lib
Diffstat (limited to 'OpenKeychain/src/main/java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 6 |
1 files changed, 4 insertions, 2 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 da419b241..c81b29a5e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -523,10 +523,12 @@ public class OpenPgpService extends RemoteService { // History of versions in org.openintents.openpgp.util.OpenPgpApi // we support 3 and 4 if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) != 3 - || data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) != 4) { + && data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) != 4) { Intent result = new Intent(); OpenPgpError error = new OpenPgpError - (OpenPgpError.INCOMPATIBLE_API_VERSIONS, "Incompatible API versions!"); + (OpenPgpError.INCOMPATIBLE_API_VERSIONS, "Incompatible API versions!\n" + + "used API version: " + data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) + "\n" + + "supported API versions: 3, 4"); result.putExtra(OpenPgpApi.RESULT_ERROR, error); result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR); return result; |