From 03d103af0722540c0f636c139fac33d3ffb28a34 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sun, 14 Sep 2014 00:55:50 +0200 Subject: pending results are a type of non-success --- .../sufficientlysecure/keychain/service/KeychainIntentService.java | 4 ++-- .../keychain/service/results/DecryptVerifyResult.java | 5 +++-- .../keychain/service/results/SignEncryptResult.java | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index e09c71787..f012d9a79 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -364,7 +364,7 @@ public class KeychainIntentService extends IntentService implements Progressable outStream.close(); - resultData.putParcelable(RESULT_DECRYPT_VERIFY_RESULT, decryptVerifyResult); + resultData.putParcelable(DecryptVerifyResult.EXTRA_RESULT, decryptVerifyResult); /* Output */ @@ -411,7 +411,7 @@ public class KeychainIntentService extends IntentService implements Progressable DecryptVerifyResult decryptVerifyResult = builder.build().execute(); - resultData.putParcelable(RESULT_DECRYPT_VERIFY_RESULT, decryptVerifyResult); + resultData.putParcelable(DecryptVerifyResult.EXTRA_RESULT, decryptVerifyResult); /* Output */ OtherHelper.logDebugBundle(resultData, "resultData"); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/DecryptVerifyResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/DecryptVerifyResult.java index e7ac209bf..7339f1306 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/DecryptVerifyResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/DecryptVerifyResult.java @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 Dominik Schürmann + * Copyright (C) 2014 Vincent Breitmoser * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +25,8 @@ import org.openintents.openpgp.OpenPgpSignatureResult; public class DecryptVerifyResult extends OperationResultParcel { - // the fourth bit indicates a "data pending" result! - public static final int RESULT_PENDING = 8; + // the fourth bit indicates a "data pending" result! (it's also a form of non-success) + public static final int RESULT_PENDING = RESULT_ERROR +8; // fifth to sixth bit in addition indicate specific type of pending public static final int RESULT_PENDING_ASYM_PASSPHRASE = RESULT_PENDING +16; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/SignEncryptResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/SignEncryptResult.java index 073eab354..100a7c675 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/SignEncryptResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/SignEncryptResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Dominik Schürmann + * Copyright (C) 2014 Vincent Breitmoser * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,8 +26,8 @@ import java.util.Date; public class SignEncryptResult extends OperationResultParcel { - // the fourth bit indicates a "data pending" result! - public static final int RESULT_PENDING = 8; + // the fourth bit indicates a "data pending" result! (it's also a form of non-success) + public static final int RESULT_PENDING = RESULT_ERROR +8; // fifth to sixth bit in addition indicate specific type of pending public static final int RESULT_PENDING_NFC = RESULT_PENDING +16; -- cgit v1.2.3