Loading src/com/android/settings/ChooseLockGeneric.java +1 −0 Original line number Diff line number Diff line Loading @@ -486,6 +486,7 @@ public class ChooseLockGeneric extends SettingsActivity { if (quality == DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) { mChooseLockSettingsHelper.utils().clearLock(mUserId); mChooseLockSettingsHelper.utils().setLockScreenDisabled(disabled, mUserId); mLockPatternUtils.setSeparateProfileChallengeEnabled(mUserId, false); removeAllFingerprintTemplatesAndFinish(); getActivity().setResult(Activity.RESULT_OK); } else { Loading src/com/android/settings/ChooseLockPassword.java +1 −2 Original line number Diff line number Diff line Loading @@ -670,12 +670,11 @@ public class ChooseLockPassword extends SettingsActivity { private String mChosenPassword; private String mCurrentPassword; private int mRequestedQuality; private int mUserId; public void start(LockPatternUtils utils, boolean required, boolean hasChallenge, long challenge, String chosenPassword, String currentPassword, int requestedQuality, int userId) { prepare(utils, required, hasChallenge, challenge); prepare(utils, required, hasChallenge, challenge, userId); mChosenPassword = chosenPassword; mCurrentPassword = currentPassword; Loading src/com/android/settings/ChooseLockPattern.java +1 −2 Original line number Diff line number Diff line Loading @@ -671,12 +671,11 @@ public class ChooseLockPattern extends SettingsActivity { private List<LockPatternView.Cell> mChosenPattern; private String mCurrentPattern; private boolean mLockVirgin; private int mUserId; public void start(LockPatternUtils utils, boolean credentialRequired, boolean hasChallenge, long challenge, List<LockPatternView.Cell> chosenPattern, String currentPattern, int userId) { prepare(utils, credentialRequired, hasChallenge, challenge); prepare(utils, credentialRequired, hasChallenge, challenge, userId); mCurrentPattern = currentPattern; mChosenPattern = chosenPattern; Loading src/com/android/settings/SaveChosenLockWorkerBase.java +6 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.Fragment; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.os.UserHandle; import com.android.internal.widget.LockPatternUtils; Loading @@ -38,6 +37,7 @@ abstract class SaveChosenLockWorkerBase extends Fragment { protected boolean mHasChallenge; protected long mChallenge; protected boolean mWasSecureBefore; protected int mUserId; @Override public void onCreate(Bundle savedInstanceState) { Loading @@ -57,12 +57,15 @@ abstract class SaveChosenLockWorkerBase extends Fragment { } protected void prepare(LockPatternUtils utils, boolean credentialRequired, boolean hasChallenge, long challenge) { boolean hasChallenge, long challenge, int userId) { mUtils = utils; mUserId = userId; mHasChallenge = hasChallenge; mChallenge = challenge; mWasSecureBefore = mUtils.isSecure(UserHandle.myUserId()); // This will be a no-op for non managed profiles. mUtils.setSeparateProfileChallengeEnabled(mUserId, true); mWasSecureBefore = mUtils.isSecure(mUserId); mUtils.setCredentialRequiredToDecrypt(credentialRequired); Loading src/com/android/settings/SecuritySettings.java +16 −6 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ public class SecuritySettings extends SettingsPreferenceFragment mProfileChallengeUserId = profile.id; } } if (LockPatternUtils.isSeparateWorkChallengeEnabled()) { if (mLockPatternUtils.isSeparateProfileChallengeAllowed(mProfileChallengeUserId)) { addPreferencesFromResource(R.xml.security_settings_profile); } } Loading Loading @@ -776,12 +776,22 @@ public class SecuritySettings extends SettingsPreferenceFragment result.add(sir); final UserManager um = UserManager.get(context); boolean hasChildProfile = um.getProfiles(UserHandle.myUserId()).size() > 1; if (hasChildProfile && LockPatternUtils.isSeparateWorkChallengeEnabled()) { List<UserInfo> profiles = um.getProfiles(UserHandle.myUserId()); int numProfiles = profiles.size(); if (numProfiles > 1) { int profileUserId = -1; for (int i = 0; i < numProfiles; ++i) { UserInfo profile = profiles.get(i); if (profile.id != UserHandle.myUserId()) { profileUserId = profile.id; } } if (lockPatternUtils.isSeparateProfileChallengeAllowed(profileUserId)) { sir = new SearchIndexableResource(context); sir.xmlResId = R.xml.security_settings_profile; result.add(sir); } } if (um.isAdminUser()) { DevicePolicyManager dpm = (DevicePolicyManager) Loading Loading
src/com/android/settings/ChooseLockGeneric.java +1 −0 Original line number Diff line number Diff line Loading @@ -486,6 +486,7 @@ public class ChooseLockGeneric extends SettingsActivity { if (quality == DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) { mChooseLockSettingsHelper.utils().clearLock(mUserId); mChooseLockSettingsHelper.utils().setLockScreenDisabled(disabled, mUserId); mLockPatternUtils.setSeparateProfileChallengeEnabled(mUserId, false); removeAllFingerprintTemplatesAndFinish(); getActivity().setResult(Activity.RESULT_OK); } else { Loading
src/com/android/settings/ChooseLockPassword.java +1 −2 Original line number Diff line number Diff line Loading @@ -670,12 +670,11 @@ public class ChooseLockPassword extends SettingsActivity { private String mChosenPassword; private String mCurrentPassword; private int mRequestedQuality; private int mUserId; public void start(LockPatternUtils utils, boolean required, boolean hasChallenge, long challenge, String chosenPassword, String currentPassword, int requestedQuality, int userId) { prepare(utils, required, hasChallenge, challenge); prepare(utils, required, hasChallenge, challenge, userId); mChosenPassword = chosenPassword; mCurrentPassword = currentPassword; Loading
src/com/android/settings/ChooseLockPattern.java +1 −2 Original line number Diff line number Diff line Loading @@ -671,12 +671,11 @@ public class ChooseLockPattern extends SettingsActivity { private List<LockPatternView.Cell> mChosenPattern; private String mCurrentPattern; private boolean mLockVirgin; private int mUserId; public void start(LockPatternUtils utils, boolean credentialRequired, boolean hasChallenge, long challenge, List<LockPatternView.Cell> chosenPattern, String currentPattern, int userId) { prepare(utils, credentialRequired, hasChallenge, challenge); prepare(utils, credentialRequired, hasChallenge, challenge, userId); mCurrentPattern = currentPattern; mChosenPattern = chosenPattern; Loading
src/com/android/settings/SaveChosenLockWorkerBase.java +6 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.Fragment; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.os.UserHandle; import com.android.internal.widget.LockPatternUtils; Loading @@ -38,6 +37,7 @@ abstract class SaveChosenLockWorkerBase extends Fragment { protected boolean mHasChallenge; protected long mChallenge; protected boolean mWasSecureBefore; protected int mUserId; @Override public void onCreate(Bundle savedInstanceState) { Loading @@ -57,12 +57,15 @@ abstract class SaveChosenLockWorkerBase extends Fragment { } protected void prepare(LockPatternUtils utils, boolean credentialRequired, boolean hasChallenge, long challenge) { boolean hasChallenge, long challenge, int userId) { mUtils = utils; mUserId = userId; mHasChallenge = hasChallenge; mChallenge = challenge; mWasSecureBefore = mUtils.isSecure(UserHandle.myUserId()); // This will be a no-op for non managed profiles. mUtils.setSeparateProfileChallengeEnabled(mUserId, true); mWasSecureBefore = mUtils.isSecure(mUserId); mUtils.setCredentialRequiredToDecrypt(credentialRequired); Loading
src/com/android/settings/SecuritySettings.java +16 −6 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ public class SecuritySettings extends SettingsPreferenceFragment mProfileChallengeUserId = profile.id; } } if (LockPatternUtils.isSeparateWorkChallengeEnabled()) { if (mLockPatternUtils.isSeparateProfileChallengeAllowed(mProfileChallengeUserId)) { addPreferencesFromResource(R.xml.security_settings_profile); } } Loading Loading @@ -776,12 +776,22 @@ public class SecuritySettings extends SettingsPreferenceFragment result.add(sir); final UserManager um = UserManager.get(context); boolean hasChildProfile = um.getProfiles(UserHandle.myUserId()).size() > 1; if (hasChildProfile && LockPatternUtils.isSeparateWorkChallengeEnabled()) { List<UserInfo> profiles = um.getProfiles(UserHandle.myUserId()); int numProfiles = profiles.size(); if (numProfiles > 1) { int profileUserId = -1; for (int i = 0; i < numProfiles; ++i) { UserInfo profile = profiles.get(i); if (profile.id != UserHandle.myUserId()) { profileUserId = profile.id; } } if (lockPatternUtils.isSeparateProfileChallengeAllowed(profileUserId)) { sir = new SearchIndexableResource(context); sir.xmlResId = R.xml.security_settings_profile; result.add(sir); } } if (um.isAdminUser()) { DevicePolicyManager dpm = (DevicePolicyManager) Loading