From 270ab889b0eafbb6fce35769e21cef78b2f028c7 Mon Sep 17 00:00:00 2001 From: alexlab2017 <30337560+alexlab2017@users.noreply.github.com> Date: Tue, 11 Sep 2018 10:53:55 +0200 Subject: Clear clipboard 20 times fix (#423) * Fix clear clipboard 20 times As described in issue #419 there was a bug when clearing clipboard 20 times because from "0" to "< 19" there are 19 numbers, not 20. 19 is never reached because of "less than" operator. This could be also fixed by changing the operator from "=" to "<=" but I think is better to change the number of times to 20. * Fixed clear clipboard 20 times hint Fixed the hint to match what really happens, consecutive numbers are stored in the clipboard 20 times. --- app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 2 +- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index dcc74840..5b969d25 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -620,7 +620,7 @@ public class AutofillService extends AccessibilityService { clip = ClipData.newPlainText("autofill_pm", ""); clipboard.setPrimaryClip(clip); if (settings.getBoolean("clear_clipboard_20x", false)) { - for (int i = 0; i < 19; i++) { + for (int i = 0; i < 20; i++) { clip = ClipData.newPlainText(String.valueOf(i), String.valueOf(i)); clipboard.setPrimaryClip(clip); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 96e028e5..2da5982a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -138,7 +138,7 @@ Always show dialog Misc Clear clipboard 20 times - Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history. + Store consecutive numbers in the clipboard 20 times. Useful on Samsung phones that feature clipboard history. Deletes local (hidden) repository External repository Use an external password repository -- cgit v1.2.3