From 7d4b6683ef446c4a7317fe7cc450533ff18c6061 Mon Sep 17 00:00:00 2001 From: Johannes Baiter Date: Wed, 29 Oct 2014 11:22:16 +0100 Subject: Add option to automatically copy password to clipboard after decryption --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 4 +++- app/src/main/res/xml/preference.xml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 5397e026..f2908ebd 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -338,7 +338,9 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne .setText(extraContent); } new DelayShow().execute(); - copyToClipBoard(); + if (settings.getBoolean("copy_on_decrypt", true)) { + copyToClipBoard(); + } } else { showToast(os.toString()); } diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index 56a16f49..0833ebf8 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -30,5 +30,9 @@ android:dialogTitle="Set the time you want the password to be in clipboard" android:summary="Set the time you want the password to be in clipboard" android:hint="45" android:key="general_show_time" /> + \ No newline at end of file -- cgit v1.2.3