OSDN Git Service

Fix races in ConfirmPassword/Pattern
authorXiyuan Xia <xiyuan@google.com>
Mon, 31 Aug 2015 18:59:46 +0000 (11:59 -0700)
committerXiyuan Xia <xiyuan@google.com>
Mon, 31 Aug 2015 22:25:31 +0000 (15:25 -0700)
commit00b17fa3c36399dfa26f3d44f8ed369336c231a3
tree09b0374307ce43623746a622e1e6f50426452746
parentfea2b30ac49e5075a4cc78c1e694a62334192f0a
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
src/com/android/settings/ConfirmLockPassword.java
src/com/android/settings/ConfirmLockPattern.java
src/com/android/settings/CredentialCheckResultTracker.java [new file with mode: 0644]