Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0a07386 authored by Ricky Wai's avatar Ricky Wai
Browse files

Do not update unified setting before updating primary profile lock

Bug: 28135945
Change-Id: Ib6332f42d3b6416d8fd08d5f829bf9852fa0e9f0
parent 2f99770c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -706,8 +706,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
    private void unifyLocks() {
        int profileQuality =
                mLockPatternUtils.getKeyguardStoredPasswordQuality(mProfileChallengeUserId);
        mLockPatternUtils.setSeparateProfileChallengeEnabled(mProfileChallengeUserId, false,
                mCurrentProfilePassword);
        if (profileQuality == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) {
            mLockPatternUtils.saveLockPattern(
                    LockPatternUtils.stringToPattern(mCurrentProfilePassword),
@@ -717,6 +715,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
                    mCurrentProfilePassword, mCurrentDevicePassword,
                    profileQuality, MY_USER_ID);
        }
        mLockPatternUtils.setSeparateProfileChallengeEnabled(mProfileChallengeUserId, false,
                mCurrentProfilePassword);
        final boolean profilePatternVisibility =
                mLockPatternUtils.isVisiblePatternEnabled(mProfileChallengeUserId);
        mLockPatternUtils.setVisiblePatternEnabled(profilePatternVisibility, MY_USER_ID);