Fix race leading to spuriously disabled trust agents

If TrustManagerService is able to refresh the trust agents before
the Settings activity gets a chance to reenable the lock pattern,
the TrustManagerService won't see a secure credential and won't
load any agents. This was introduced when we switched to isSecure
instead of getKeyguardStoredPasswordQuality. The latter ignored
the lockPatternEnabled flag.

Bug: 18596036
Change-Id: I2734899f7684916fc84bc3a07edca29310887103
This commit is contained in:
Adrian Roos
2014-12-05 18:47:12 +01:00
parent 3f5fd1feba
commit 16809b1ad7

View File

@@ -555,8 +555,8 @@ public class ChooseLockPattern extends SettingsActivity {
final boolean required = getActivity().getIntent().getBooleanExtra( final boolean required = getActivity().getIntent().getBooleanExtra(
EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true); EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true);
utils.setCredentialRequiredToDecrypt(required); utils.setCredentialRequiredToDecrypt(required);
utils.saveLockPattern(mChosenPattern, isFallback);
utils.setLockPatternEnabled(true); utils.setLockPatternEnabled(true);
utils.saveLockPattern(mChosenPattern, isFallback);
if (lockVirgin) { if (lockVirgin) {
utils.setVisiblePatternEnabled(true); utils.setVisiblePatternEnabled(true);