aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-09-14 00:33:19 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-09-14 00:33:30 +0200
commitf0e159a372174db4d0939f8f747a05b62d9b068d (patch)
tree00eb8eb73e04c39d37cac8d15bfc6f4ef08f4206 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
parent6156600e42407a6a810f3f8b294197de47095f74 (diff)
downloadopen-keychain-f0e159a372174db4d0939f8f747a05b62d9b068d.tar.gz
open-keychain-f0e159a372174db4d0939f8f747a05b62d9b068d.tar.bz2
open-keychain-f0e159a372174db4d0939f8f747a05b62d9b068d.zip
add SignEncryptResult parcel (probably break stuff)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java14
1 files changed, 5 insertions, 9 deletions
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 f8ef9b0f6..e09c71787 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
@@ -63,6 +63,7 @@ import org.sufficientlysecure.keychain.service.results.ConsolidateResult;
import org.sufficientlysecure.keychain.service.results.EditKeyResult;
import org.sufficientlysecure.keychain.service.results.ImportKeyResult;
import org.sufficientlysecure.keychain.service.results.SaveKeyringResult;
+import org.sufficientlysecure.keychain.service.results.SignEncryptResult;
import org.sufficientlysecure.keychain.util.ParcelableFileCache;
import org.sufficientlysecure.keychain.util.InputData;
import org.sufficientlysecure.keychain.util.Log;
@@ -91,7 +92,7 @@ public class KeychainIntentService extends IntentService implements Progressable
public static final String EXTRA_DATA = "data";
/* possible actions */
- public static final String ACTION_ENCRYPT_SIGN = Constants.INTENT_PREFIX + "ENCRYPT_SIGN";
+ public static final String ACTION_SIGN_ENCRYPT = Constants.INTENT_PREFIX + "SIGN_ENCRYPT";
public static final String ACTION_DECRYPT_VERIFY = Constants.INTENT_PREFIX + "DECRYPT_VERIFY";
@@ -247,7 +248,7 @@ public class KeychainIntentService extends IntentService implements Progressable
String action = intent.getAction();
// executeServiceMethod action from extra bundle
- if (ACTION_ENCRYPT_SIGN.equals(action)) {
+ if (ACTION_SIGN_ENCRYPT.equals(action)) {
try {
/* Input */
int source = data.get(SOURCE) != null ? data.getInt(SOURCE) : data.getInt(TARGET);
@@ -309,7 +310,8 @@ public class KeychainIntentService extends IntentService implements Progressable
builder.setCleartextInput(true);
}
- builder.build().execute();
+ SignEncryptResult result = builder.build().execute();
+ resultData.putParcelable(SignEncryptResult.EXTRA_RESULT, result);
outStream.close();
@@ -779,12 +781,6 @@ public class KeychainIntentService extends IntentService implements Progressable
if (e instanceof PgpGeneralMsgIdException) {
e = ((PgpGeneralMsgIdException) e).getContextualized(this);
message = e.getMessage();
- } else if (e instanceof PgpSignEncrypt.KeyExtractionException) {
- message = getString(R.string.error_could_not_extract_private_key);
- } else if (e instanceof PgpSignEncrypt.NoPassphraseException) {
- message = getString(R.string.error_no_signature_passphrase);
- } else if (e instanceof PgpSignEncrypt.NoSigningKeyException) {
- message = getString(R.string.error_no_signature_key);
} else {
message = e.getMessage();
}