From d95286660ad5e626c75f4bc9f70e51277be67273 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Tue, 21 Jul 2015 16:10:55 -0400 Subject: Add 'clear clipboard 20 times' preference --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 6 ++++++ app/src/main/res/values-cs/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/preference.xml | 7 +++++++ 4 files changed, 17 insertions(+) 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 ca5ab33d..b744c4a0 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -256,6 +256,12 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne protected void onPostExecute(Boolean b) { ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", "MyPasswordIsDaBest!"); clipboard.setPrimaryClip(clip); + if (settings.getBoolean("clear_clipboard_20x", false)) { + for (int i = 0; i < 19; i++) { + clip = ClipData.newPlainText(String.valueOf(i), String.valueOf(i)); + clipboard.setPrimaryClip(clip); + } + } if (showPassword) { //clear password ((TextView) findViewById(R.id.crypto_password_show)).setText(""); diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 9180500a..1252adcb 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -116,6 +116,8 @@ Zpráva : \n Rekurzivní filtrování Rekurzivní hledání hesel v aktuálním adresáři. + Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history. + Clear clipboard 20 times Generate diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f60e4b15..75d5bb51 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -117,6 +117,8 @@ Message : \n Recursive filtering Recursively find passwords of the current directory. + Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history. + Clear clipboard 20 times Generate diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index 67217c9d..e4071c96 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -70,4 +70,11 @@ android:summary="@string/pref_recursive_filter_hint" android:title="@string/pref_recursive_filter" /> + + + \ No newline at end of file -- cgit v1.2.3