aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysProxyActivity.java18
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationHelper.java1
2 files changed, 11 insertions, 8 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysProxyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysProxyActivity.java
index a2976b437..36d728d35 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysProxyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysProxyActivity.java
@@ -110,7 +110,16 @@ public class ImportKeysProxyActivity extends FragmentActivity
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (mImportOpHelper != null) {
- mImportOpHelper.handleActivityResult(requestCode, resultCode, data);
+ if (!mImportOpHelper.handleActivityResult(requestCode, resultCode, data)) {
+ // if a result has been returned, and it does not belong to mImportOpHelper,
+ // return it down to other activity
+ if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
+ returnResult(data);
+ } else {
+ super.onActivityResult(requestCode, resultCode, data);
+ finish();
+ }
+ }
}
if (requestCode == IntentIntegratorSupportV4.REQUEST_CODE) {
@@ -128,13 +137,6 @@ public class ImportKeysProxyActivity extends FragmentActivity
return;
}
- // if a result has been returned, return it down to other activity
- if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
- returnResult(data);
- } else {
- super.onActivityResult(requestCode, resultCode, data);
- finish();
- }
}
private void processScannedContent(String content) {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationHelper.java
index f72e87ca7..4bf86af8f 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationHelper.java
@@ -171,6 +171,7 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
// this wasn't meant for us to handle
return false;
} else {
+ // reset mRequestedCode because we have finished what we started
mRequestedCode = -1;
}
if (resultCode == Activity.RESULT_CANCELED) {