diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-06 23:39:26 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-06 23:40:22 +0200 |
commit | b779211f55a126d54c643fb9f13a0a17b46c37bf (patch) | |
tree | a526af2e5d385691c20393560443e17f9a61201a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java | |
parent | fa614383065a22269c5ca249819c46b82e20a194 (diff) | |
parent | 7cfc0d80d0b4318ce1ae027536d70c2cda4c8605 (diff) | |
download | open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.tar.gz open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.tar.bz2 open-keychain-b779211f55a126d54c643fb9f13a0a17b46c37bf.zip |
Merge branch 'master' into v/multi-decrypt
this also fixes weird-bug
Conflicts:
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java
OpenKeychain/src/main/res/values/strings.xml
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java index 5b19d9e42..a0bb250d4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/ServiceProgressHandler.java @@ -18,14 +18,16 @@ package org.sufficientlysecure.keychain.service; import android.app.Activity; -import android.app.FragmentManager; +import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v4.app.FragmentActivity; +import android.support.v4.app.FragmentManager; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.operations.results.CertifyResult; import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment; import org.sufficientlysecure.keychain.ui.util.Notify; import org.sufficientlysecure.keychain.util.Log; @@ -33,7 +35,7 @@ import org.sufficientlysecure.keychain.util.Log; public class ServiceProgressHandler extends Handler { // possible messages sent from this service to handler on ui - public static enum MessageStatus{ + public enum MessageStatus { UNKNOWN, OKAY, EXCEPTION, @@ -42,9 +44,8 @@ public class ServiceProgressHandler extends Handler { private static final MessageStatus[] values = values(); - public static MessageStatus fromInt(int n) - { - if(n < 0 || n >= values.length) { + public static MessageStatus fromInt(int n) { + if (n < 0 || n >= values.length) { return UNKNOWN; } else { return values[n]; @@ -71,30 +72,24 @@ public class ServiceProgressHandler extends Handler { this.mActivity = activity; } - public ServiceProgressHandler(Activity activity, - ProgressDialogFragment progressDialogFragment) { + public ServiceProgressHandler(Activity activity, ProgressDialogFragment progressDialogFragment) { this.mActivity = activity; this.mProgressDialogFragment = progressDialogFragment; } - public ServiceProgressHandler(Activity activity, - String progressDialogMessage, - int progressDialogStyle, - ProgressDialogFragment.ServiceType serviceType) { - this(activity, progressDialogMessage, progressDialogStyle, false, serviceType); + public ServiceProgressHandler(Activity activity, String progressDialogMessage, int progressDialogStyle) { + this(activity, progressDialogMessage, progressDialogStyle, false); } public ServiceProgressHandler(Activity activity, String progressDialogMessage, int progressDialogStyle, - boolean cancelable, - ProgressDialogFragment.ServiceType serviceType) { + boolean cancelable) { this.mActivity = activity; this.mProgressDialogFragment = ProgressDialogFragment.newInstance( progressDialogMessage, progressDialogStyle, - cancelable, - serviceType); + cancelable); } public void showProgressDialog(FragmentActivity activity) { @@ -104,7 +99,7 @@ public class ServiceProgressHandler extends Handler { // TODO: This is a hack!, see // http://stackoverflow.com/questions/10114324/show-dialogfragment-from-onactivityresult - final FragmentManager manager = activity.getFragmentManager(); + final FragmentManager manager = activity.getSupportFragmentManager(); Handler handler = new Handler(); handler.post(new Runnable() { public void run() { |