From ddd81d8f7e91303529d0e64d1ef9710de9044ed0 Mon Sep 17 00:00:00 2001 From: Mohamed Zenadi Date: Sat, 31 Dec 2016 12:33:23 +0100 Subject: set the timer to clear the clipboard on copy fix #244 --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app') 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 6382f914..095aab9a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -254,8 +254,11 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne return; } + setTimer(); + ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", decodedPassword); clipboard.setPrimaryClip(clip); + try { showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) + " " + Integer.parseInt(settings.getString("general_show_time", "45")) + " " @@ -521,8 +524,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne .setText(extraContent); } - setTimer(); - if (settings.getBoolean("copy_on_decrypt", true)) { copyToClipBoard(); } -- cgit v1.2.3