aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java13
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) {