diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-04 10:51:26 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-04 10:51:26 +0100 |
commit | 07bb421da57c555de9a7c76eb746070543b59c70 (patch) | |
tree | 152f21e5f3fa6f6f2d2655df11350bbcdd942790 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java | |
parent | b837579cdcb88c5c71708d66b78c9e21cf33a4e8 (diff) | |
parent | af6713dc78448b7686a546d77c022f4aacd58dfb (diff) | |
download | open-keychain-07bb421da57c555de9a7c76eb746070543b59c70.tar.gz open-keychain-07bb421da57c555de9a7c76eb746070543b59c70.tar.bz2 open-keychain-07bb421da57c555de9a7c76eb746070543b59c70.zip |
Merge pull request #315 from jessicayuen/master
#226: Added cancel option to ProgressDialogFragments. Create Key is now cancelable.
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java index dfea7eb04..6eba9cc83 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java @@ -21,6 +21,8 @@ import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment; import org.sufficientlysecure.keychain.R; import android.app.Activity; +import android.content.DialogInterface; +import android.content.DialogInterface.OnCancelListener; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -55,9 +57,15 @@ public class KeychainIntentServiceHandler extends Handler { } public KeychainIntentServiceHandler(Activity activity, int progressDialogMessageId, int progressDialogStyle) { + this(activity, progressDialogMessageId, progressDialogStyle, false, null); + } + + public KeychainIntentServiceHandler(Activity activity, int progressDialogMessageId, + int progressDialogStyle, boolean cancelable, + OnCancelListener onCancelListener) { this.mActivity = activity; this.mProgressDialogFragment = ProgressDialogFragment.newInstance(progressDialogMessageId, - progressDialogStyle); + progressDialogStyle, cancelable, onCancelListener); } public void showProgressDialog(FragmentActivity activity) { |