Clear mHasResult if the result is dispatched

The bug is because we dispatch the result again in setListener.
We should reset mHasResult if the result is dispatched already.
This bug is actually not work-challenge specific, I can reproduce it
in the setting to change screen lock.

Bug: 27242673
Change-Id: I29d2769a16c53d7103dafe1811bc808d634a8d85
diff --git a/src/com/android/settings/CredentialCheckResultTracker.java b/src/com/android/settings/CredentialCheckResultTracker.java
index 179a93c..cfd6f29 100644
--- a/src/com/android/settings/CredentialCheckResultTracker.java
+++ b/src/com/android/settings/CredentialCheckResultTracker.java
@@ -61,6 +61,7 @@
         if (mListener != null) {
             mListener.onCredentialChecked(mResultMatched, mResultData, mResultTimeoutMs,
                     mResultEffectiveUserId, true /* newResult */);
+            mHasResult = false;
         }
     }