diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-16 12:24:46 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-16 12:24:46 +0200 |
commit | 474fc50b80ae57e3434c2d748895eda28d2ef548 (patch) | |
tree | f6e85f7881a53bc5ec463fa20458f5423999a1f6 /OpenKeychain | |
parent | 188eeb79c9f2eb536d73efee09a3698750c87dab (diff) | |
download | open-keychain-474fc50b80ae57e3434c2d748895eda28d2ef548.tar.gz open-keychain-474fc50b80ae57e3434c2d748895eda28d2ef548.tar.bz2 open-keychain-474fc50b80ae57e3434c2d748895eda28d2ef548.zip |
Always return a SaveKeyringResult from saving
Diffstat (limited to 'OpenKeychain')
2 files changed, 7 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 83ade9b9b..036251cd6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -411,7 +411,12 @@ public class KeychainIntentService extends IntentService // If the edit operation didn't succeed, exit here if (!modifyResult.success()) { - sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, modifyResult); + // always return SaveKeyringResult, so create one out of the EditKeyResult + SaveKeyringResult saveResult = new SaveKeyringResult( + SaveKeyringResult.RESULT_ERROR, + modifyResult.getLog(), + null); + sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_OKAY, saveResult); return; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java index 3fc9e7f31..461d25928 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java @@ -125,10 +125,9 @@ public class CreateKeyFinalFragment extends Fragment { Intent intent = new Intent(getActivity(), KeychainIntentService.class); intent.setAction(KeychainIntentService.ACTION_SAVE_KEYRING); - // Message is received after importing is done in KeychainIntentService KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler( getActivity(), - getString(R.string.progress_importing), + getString(R.string.progress_building_key), ProgressDialog.STYLE_HORIZONTAL) { public void handleMessage(Message message) { // handle messages by standard KeychainIntentServiceHandler first @@ -211,7 +210,6 @@ public class CreateKeyFinalFragment extends Fragment { intent.putExtra(KeychainIntentService.EXTRA_DATA, data); - // Message is received after uploading is done in KeychainIntentService KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(getActivity(), getString(R.string.progress_uploading), ProgressDialog.STYLE_HORIZONTAL) { public void handleMessage(Message message) { |