OSDN Git Service

Fix a race condition determining whether password fallback mode is allowed.
authorDaniel Sandler <dsandler@google.com>
Sat, 14 Nov 2009 01:07:50 +0000 (17:07 -0800)
committerDaniel Sandler <dsandler@google.com>
Sat, 14 Nov 2009 01:10:46 +0000 (17:10 -0800)
commitf31bb1aff8005525749df7b519fd60ef08157bfc
treece7071e273adebd5debfd89110091f450a97bacb
parent1d697192404e3f556b8e87c9f048f16cb3256608
Fix a race condition determining whether password fallback mode is allowed.

The fix is in LockPatternKeyguardView, whose constructor was
firing off an asynchronous request to the AccountManager to
find out about the specifics of the account on the device.
(If it's SAML, we don't have the password in cleartext and
therefore can't use it to unlock.) Unfortunately, if the
AccountManager responds too quickly, we get the answer (in
LPKV.run()) before the UnlockScreen has even been
instantiated (later in LPKV's ctor).

The fix is to create the unlock screen first and *then* ping
the AccountManager for details.

Bug: http://b/2216308
Change-Id: Iedc84675c0ab8a001d062d806e2bee7ed1a29758
phone/com/android/internal/policy/impl/KeyguardViewManager.java
phone/com/android/internal/policy/impl/LockPatternKeyguardView.java
phone/com/android/internal/policy/impl/UnlockScreen.java