From 0f6dc253a40ecada0c0c2a467c56ee45b7b9cc72 Mon Sep 17 00:00:00 2001 From: Daniel Hammann Date: Fri, 21 Mar 2014 23:01:24 +0100 Subject: [PATCH] Because of an unknown reason toast messages were commented out. --- .../keychain/ui/EditKeyActivity.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java index 9b64def1e..092a502e1 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java @@ -495,11 +495,10 @@ public class EditKeyActivity extends ActionBarActivity { private void saveClicked() { long masterKeyId = getMasterKeyId(); - try { - if (!isPassphraseSet()) { - throw new PgpGeneralException(this.getString(R.string.set_a_passphrase)); - } - + if (!isPassphraseSet()) { + Log.e(Constants.TAG, "No passphrase has been set"); + Toast.makeText(this, R.string.set_a_passphrase, Toast.LENGTH_LONG).show(); + } else { String passphrase = null; if (mIsPassPhraseSet) { passphrase = PassphraseCacheService.getCachedPassphrase(this, masterKeyId); @@ -512,9 +511,6 @@ public class EditKeyActivity extends ActionBarActivity { mCurrentPassphrase = passphrase; finallySaveClicked(); } - } catch (PgpGeneralException e) { - //Toast.makeText(this, getString(R.string.error_message, e.getMessage()), - // Toast.LENGTH_SHORT).show(); } } @@ -576,8 +572,9 @@ public class EditKeyActivity extends ActionBarActivity { // start service with intent startService(intent); } catch (PgpGeneralException e) { - //Toast.makeText(this, getString(R.string.error_message, e.getMessage()), - // Toast.LENGTH_SHORT).show(); + Log.e(Constants.TAG, getString(R.string.error_message, e.getMessage())); + Toast.makeText(this, getString(R.string.error_message, e.getMessage()), + Toast.LENGTH_SHORT).show(); } }