From 9f5581463f1b2d07217f59fa32346c786069dbf5 Mon Sep 17 00:00:00 2001 From: Adithya Abraham Philip Date: Sun, 22 Mar 2015 03:31:13 +0530 Subject: shifted multi-threading to own service added multi-threaded cloud import, restored KeychainIntentService eliminated code duplication in multi-threaded import --- .../org/sufficientlysecure/keychain/ui/UploadKeyActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java index 4fb2074a5..c518cbcdb 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java @@ -36,7 +36,8 @@ import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings; 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.util.Log; import org.sufficientlysecure.keychain.util.Preferences; @@ -107,8 +108,11 @@ public class UploadKeyActivity extends BaseActivity { intent.putExtra(KeychainIntentService.EXTRA_DATA, data); // Message is received after uploading is done in KeychainIntentService - KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this, - getString(R.string.progress_uploading), ProgressDialog.STYLE_HORIZONTAL) { + ServiceProgressHandler saveHandler = new ServiceProgressHandler( + this, + getString(R.string.progress_uploading), + ProgressDialog.STYLE_HORIZONTAL, + ProgressDialogFragment.ServiceType.KEYCHAIN_INTENT) { public void handleMessage(Message message) { // handle messages by standard KeychainIntentServiceHandler first super.handleMessage(message); -- cgit v1.2.3