Merge "Do not update unified setting before updating primary profile lock" into nyc-dev

am: 8e91558

* commit '8e91558c0a70a042e0fcbabb8e9c536c9f23b47f':
  Do not update unified setting before updating primary profile lock

Change-Id: Ibd55f7cd0bfce0361494246d3c9ba7cb0f3d0f5d
This commit is contained in:
Ricky Wai
2016-04-12 17:11:05 +00:00
committed by android-build-merger

View File

@@ -706,8 +706,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
private void unifyLocks() { private void unifyLocks() {
int profileQuality = int profileQuality =
mLockPatternUtils.getKeyguardStoredPasswordQuality(mProfileChallengeUserId); mLockPatternUtils.getKeyguardStoredPasswordQuality(mProfileChallengeUserId);
mLockPatternUtils.setSeparateProfileChallengeEnabled(mProfileChallengeUserId, false,
mCurrentProfilePassword);
if (profileQuality == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) { if (profileQuality == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) {
mLockPatternUtils.saveLockPattern( mLockPatternUtils.saveLockPattern(
LockPatternUtils.stringToPattern(mCurrentProfilePassword), LockPatternUtils.stringToPattern(mCurrentProfilePassword),
@@ -717,6 +715,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
mCurrentProfilePassword, mCurrentDevicePassword, mCurrentProfilePassword, mCurrentDevicePassword,
profileQuality, MY_USER_ID); profileQuality, MY_USER_ID);
} }
mLockPatternUtils.setSeparateProfileChallengeEnabled(mProfileChallengeUserId, false,
mCurrentProfilePassword);
final boolean profilePatternVisibility = final boolean profilePatternVisibility =
mLockPatternUtils.isVisiblePatternEnabled(mProfileChallengeUserId); mLockPatternUtils.isVisiblePatternEnabled(mProfileChallengeUserId);
mLockPatternUtils.setVisiblePatternEnabled(profilePatternVisibility, MY_USER_ID); mLockPatternUtils.setVisiblePatternEnabled(profilePatternVisibility, MY_USER_ID);