From b2839eb0a166cdff87e1a1a2433f036bb71be203 Mon Sep 17 00:00:00 2001 From: Mohamed Date: Sun, 19 Nov 2017 12:13:38 +0100 Subject: [PATCH] add a missing check that password clearing task is running fixes #351 --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 905f37bf..3b47bf66 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt @@ -495,7 +495,10 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { } private fun setTimer() { - delayTask?.skip = true + // if the previous task is still running, do not ask it to clear the password + if (delayTask?.status == AsyncTask.Status.RUNNING) { + delayTask?.skip = true + } // launch a new one delayTask = DelayShow(this)