Commit Graph

4 Commits

Author SHA1 Message Date
Tony Mak
b27d5b2007 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
2016-03-18 18:44:57 +00:00
Clara Bayarri
9d357ea072 Call reportFailedPasswordAttempt from Work Challenge
Entering the wrong credential in ConfirmDeviceCredentials should
also count as failed attempts for the password, after which the
DPC have set a restriction to wipe the work profile.

Fixed related issues, such as the CredentialChecker re-sending
the result after onResume causing additional attempts to be counted.

The new error message String is also displayed initially when there
are pending attempts to inform the user that they are not starting
from fresh.

Bug: 26677759
Change-Id: I70cfae4c05e705ad7fe93bc071426459b79e7d0c
2016-02-17 12:22:16 +00:00
Jorim Jaggi
69671dafc8 Fix crash in when restoring CredentialCheckResultTracker Fragment
Bug: 23956504
Change-Id: I884e47a793d6bc00cc0c54fe9e3d4bcf4e0199c1
2015-09-10 13:35:04 -07:00
Xiyuan Xia
00b17fa3c3 Fix races in ConfirmPassword/Pattern
- Add a CheckLockResultTracker to track result of async lock check so that
  it can finish on configuration change;
- Let the pending lock check finish and ignore subsequent check requests;
- Add a mDisappearing flag to prevent running disappear animation
  multiple times;
- Check whether activity is still active after disappear animation
  before setting result and finishing it;
- Remove no longer used mNumWrongConfirmAttempts;

Bug:23190499
Change-Id: If1784d3d1fcc152ac06137b12748b9def5726692
2015-08-31 15:25:31 -07:00