diff options
author | zeapo <mohamed@zenadi.com> | 2014-11-09 17:19:07 +0100 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2014-11-09 17:19:07 +0100 |
commit | 28ba83372ca49c8ce38aceb59877fc67a663d792 (patch) | |
tree | f8662a990284f685e85187c8ea19e1a7bc650e97 | |
parent | 3417bdfb0bf68833594315c24ad55db8d37dab4f (diff) |
if the timer is empty default to 45secv1.2-a5
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 97856fd2..ce0ff9b6 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -149,9 +149,16 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText()); clipboard.setPrimaryClip(clip); - showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) - + Integer.parseInt(settings.getString("general_show_time", "45")) - + this.getResources().getString(R.string.clipboard_ending_toast_text)); + try { + showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) + + Integer.parseInt(settings.getString("general_show_time", "45")) + + this.getResources().getString(R.string.clipboard_ending_toast_text)); + } catch (NumberFormatException e) + { + showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) + + "45" + + this.getResources().getString(R.string.clipboard_ending_toast_text)); + } } public void handleClick(View view) { |