From 1dbb3db32020a3e5cd440998f1b3aac116285952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sat, 4 Oct 2014 23:47:17 +0200 Subject: [PATCH] Display result in multi certify --- .../sufficientlysecure/keychain/ui/AddKeysActivity.java | 2 +- .../keychain/ui/MultiCertifyKeyActivity.java | 1 + .../keychain/ui/MultiCertifyKeyFragment.java | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/AddKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/AddKeysActivity.java index e2393c722..f806880ba 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/AddKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/AddKeysActivity.java @@ -385,7 +385,7 @@ public class AddKeysActivity extends ActionBarActivity implements finish(); Intent certifyIntent = new Intent(AddKeysActivity.this, MultiCertifyKeyActivity.class); - certifyIntent.putExtra(ImportKeyResult.EXTRA_RESULT, result); + certifyIntent.putExtra(MultiCertifyKeyActivity.EXTRA_RESULT, result); certifyIntent.putExtra(MultiCertifyKeyActivity.EXTRA_KEY_IDS, result.getImportedMasterKeyIds()); startActivity(certifyIntent); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyActivity.java index 6b882f7ce..afb23ef64 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyActivity.java @@ -28,6 +28,7 @@ import org.sufficientlysecure.keychain.R; */ public class MultiCertifyKeyActivity extends ActionBarActivity { + public static final String EXTRA_RESULT = "operation_result"; public static final String EXTRA_KEY_IDS = "extra_key_ids"; @Override diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java index 616ea59b7..339f7b29b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiCertifyKeyFragment.java @@ -53,6 +53,7 @@ import org.sufficientlysecure.keychain.service.KeychainIntentService; import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler; import org.sufficientlysecure.keychain.service.PassphraseCacheService; import org.sufficientlysecure.keychain.service.results.CertifyResult; +import org.sufficientlysecure.keychain.service.results.OperationResult; import org.sufficientlysecure.keychain.ui.adapter.MultiUserIdsAdapter; import org.sufficientlysecure.keychain.ui.dialog.PassphraseDialogFragment; import org.sufficientlysecure.keychain.ui.util.Notify; @@ -105,6 +106,12 @@ public class MultiCertifyKeyFragment extends LoaderFragment return; } + OperationResult result = mActivity.getIntent().getParcelableExtra(MultiCertifyKeyActivity.EXTRA_RESULT); + if (result != null) { + // display result from import + result.createNotify(mActivity).show(); + } + mUserIdsAdapter = new MultiUserIdsAdapter(mActivity, null, 0); mUserIds.setAdapter(mUserIdsAdapter);