aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
index 98921d17..9dfd5f04 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
@@ -116,7 +116,9 @@ class DecryptTest {
SystemClock.sleep(4000)
// The clipboard should be cleared!!
- assertEquals("", clipboard.primaryClip.getItemAt(0).text)
+ for(i in 0..clipboard.primaryClip.itemCount) {
+ assertEquals("", clipboard.primaryClip.getItemAt(i).text)
+ }
// set back the timer
activity.settings.edit().putString("general_show_time", showTime.toString()).commit()
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
index 93fd7489..c7b1273f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -753,7 +753,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
clipboard.primaryClip = clip
if (settings.getBoolean("clear_clipboard_20x", false)) {
val handler = Handler()
- for (i in 0..18) {
+ for (i in 0..19) {
val count = i.toString()
handler.postDelayed(
{ clipboard.primaryClip = ClipData.newPlainText(count, count) },