summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexlab2017 <30337560+alexlab2017@users.noreply.github.com>2018-09-11 10:53:55 +0200
committerMohamed Zenadi <zeapo@users.noreply.github.com>2018-09-11 10:53:55 +0200
commit270ab889b0eafbb6fce35769e21cef78b2f028c7 (patch)
tree105244ce561802da4dd26e6d36e262410eb40ac8
parentdd43545c4c52910fecfd912c88019171814796f1 (diff)
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.
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java2
-rw-r--r--app/src/main/res/values/strings.xml2
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 @@
<string name="pref_autofill_always_title">Always show dialog</string>
<string name="pref_misc_title">Misc</string>
<string name="pref_clear_clipboard_title">Clear clipboard 20 times</string>
- <string name="pref_clear_clipboard_hint">Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history.</string>
+ <string name="pref_clear_clipboard_hint">Store consecutive numbers in the clipboard 20 times. Useful on Samsung phones that feature clipboard history.</string>
<string name="pref_git_delete_repo_summary">Deletes local (hidden) repository</string>
<string name="pref_external_repository">External repository</string>
<string name="pref_external_repository_summary">Use an external password repository</string>