diff options
author | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-03-22 03:31:13 +0530 |
---|---|---|
committer | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-03-23 15:37:05 +0530 |
commit | 9f5581463f1b2d07217f59fa32346c786069dbf5 (patch) | |
tree | 3f3e8688dce87ba5253a9efe600f39456dbecc77 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java | |
parent | 19775c399b106149e8906a7482a4b5a4af2ac8fa (diff) | |
download | open-keychain-9f5581463f1b2d07217f59fa32346c786069dbf5.tar.gz open-keychain-9f5581463f1b2d07217f59fa32346c786069dbf5.tar.bz2 open-keychain-9f5581463f1b2d07217f59fa32346c786069dbf5.zip |
shifted multi-threading to own service
added multi-threaded cloud import, restored KeychainIntentService
eliminated code duplication in multi-threaded import
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java index 863aef65f..c58a945d3 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SafeSlingerActivity.java @@ -39,7 +39,8 @@ import org.sufficientlysecure.keychain.operations.results.OperationResult; import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.service.KeychainIntentService; -import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler; +import org.sufficientlysecure.keychain.service.ServiceProgressHandler; +import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment; import org.sufficientlysecure.keychain.ui.util.Notify; import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.ParcelableFileCache; @@ -123,11 +124,12 @@ public class SafeSlingerActivity extends BaseActivity { final FragmentActivity activity = SafeSlingerActivity.this; // Message is received after importing is done in KeychainIntentService - KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler( + ServiceProgressHandler saveHandler = new ServiceProgressHandler( activity, getString(R.string.progress_importing), ProgressDialog.STYLE_HORIZONTAL, - true) { + true, + ProgressDialogFragment.ServiceType.KEYCHAIN_INTENT) { public void handleMessage(Message message) { // handle messages by standard KeychainIntentServiceHandler first super.handleMessage(message); |