diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-18 03:10:59 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-18 03:10:59 +0200 |
commit | c11fef6e7c80681ce69e5fdc7f4796b0b7a18e2b (patch) | |
tree | 08f7b132039671fcf8e5d76655181d8a3d3023fb /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java | |
parent | f978aca8e587e4b9cd0574cac6f4bc7cc3d9fef9 (diff) | |
download | open-keychain-c11fef6e7c80681ce69e5fdc7f4796b0b7a18e2b.tar.gz open-keychain-c11fef6e7c80681ce69e5fdc7f4796b0b7a18e2b.tar.bz2 open-keychain-c11fef6e7c80681ce69e5fdc7f4796b0b7a18e2b.zip |
handle multiple input URIs and Intent.SEND_MULTIPLE
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java index 5f1097588..764602735 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java @@ -123,6 +123,14 @@ public abstract class CryptoOperationFragment <T extends Parcelable, S extends O protected abstract T createOperationInput(); protected void cryptoOperation(CryptoInputParcel cryptoInput) { + cryptoOperation(cryptoInput, true); + } + + protected void cryptoOperation() { + cryptoOperation(new CryptoInputParcel()); + } + + protected void cryptoOperation(CryptoInputParcel cryptoInput, boolean showProgress) { T operationInput = createOperationInput(); if (operationInput == null) { @@ -169,18 +177,16 @@ public abstract class CryptoOperationFragment <T extends Parcelable, S extends O Messenger messenger = new Messenger(saveHandler); intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger); - saveHandler.showProgressDialog( - getString(R.string.progress_building_key), - ProgressDialog.STYLE_HORIZONTAL, false); + if (showProgress) { + saveHandler.showProgressDialog( + getString(R.string.progress_building_key), + ProgressDialog.STYLE_HORIZONTAL, false); + } getActivity().startService(intent); } - protected void cryptoOperation() { - cryptoOperation(new CryptoInputParcel()); - } - protected void onCryptoOperationResult(S result) { if (result.success()) { onCryptoOperationSuccess(result); |