aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorJohannes Baiter <johannes.baiter@gmail.com>2014-10-29 11:22:16 +0100
committerJohannes Baiter <johannes.baiter@gmail.com>2014-10-29 11:22:16 +0100
commit7d4b6683ef446c4a7317fe7cc450533ff18c6061 (patch)
tree58929fc271fc43647f71abb22c0607d07787a189 /app/src/main
parent9822c097cb276aecae3ffa954b5551a5a08de83e (diff)
Add option to automatically copy password to clipboard after decryption
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java4
-rw-r--r--app/src/main/res/xml/preference.xml4
2 files changed, 7 insertions, 1 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 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" />
+ <CheckBoxPreference android:title="Automatically Copy Password"
+ android:dialogTitle="Automatically copy the password to the clipboard after decryption was successful."
+ android:summary="Automatically copy the password to the clipboard after decryption was successful."
+ android:key="copy_on_decrypt" android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen> \ No newline at end of file