diff options
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 | 21 |
1 files changed, 19 insertions, 2 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 65c756f9a..c3de39235 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 @@ -55,6 +55,10 @@ public class KeychainIntentServiceHandler extends Handler { this.mProgressDialogFragment = progressDialogFragment; } + public KeychainIntentServiceHandler(Activity activity, String progressDialogMessage, int progressDialogStyle) { + this(activity, progressDialogMessage, progressDialogStyle, false, null); + } + public KeychainIntentServiceHandler(Activity activity, int progressDialogMessageId, int progressDialogStyle) { this(activity, progressDialogMessageId, progressDialogStyle, false, null); } @@ -62,9 +66,22 @@ public class KeychainIntentServiceHandler extends Handler { public KeychainIntentServiceHandler(Activity activity, int progressDialogMessageId, int progressDialogStyle, boolean cancelable, OnCancelListener onCancelListener) { + this(activity, + activity.getString(progressDialogMessageId), + progressDialogStyle, + cancelable, + onCancelListener); + } + + public KeychainIntentServiceHandler(Activity activity, String progressDialogMessage, + int progressDialogStyle, boolean cancelable, + OnCancelListener onCancelListener) { this.mActivity = activity; - this.mProgressDialogFragment = ProgressDialogFragment.newInstance(progressDialogMessageId, - progressDialogStyle, cancelable, onCancelListener); + this.mProgressDialogFragment = ProgressDialogFragment.newInstance( + progressDialogMessage, + progressDialogStyle, + cancelable, + onCancelListener); } public void showProgressDialog(FragmentActivity activity) { |