Loading src/com/android/settings/ChooseLockGeneric.java +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ public class ChooseLockGeneric extends SettingsActivity { } } else if (requestCode == CHOOSE_LOCK_REQUEST || requestCode == ENABLE_ENCRYPTION_REQUEST) { if (resultCode != RESULT_CANCELED) { if (resultCode != RESULT_CANCELED || mForChangeCredRequiredForBoot) { getActivity().setResult(resultCode, data); finish(); } Loading src/com/android/settings/SaveChosenLockWorkerBase.java +5 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.settings; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; Loading Loading @@ -70,7 +71,10 @@ abstract class SaveChosenLockWorkerBase extends Fragment { mUtils.setSeparateProfileChallengeEnabled(mUserId, true); mWasSecureBefore = mUtils.isSecure(mUserId); if (UserManager.get(getContext()).getUserInfo(mUserId).isPrimary()) { Context context = getContext(); // If context is null, we're being invoked to change the setCredentialRequiredToDecrypt, // and we made sure that this is the primary user already. if (context == null || UserManager.get(context).getUserInfo(mUserId).isPrimary()) { mUtils.setCredentialRequiredToDecrypt(credentialRequired); } Loading src/com/android/settings/SecuritySettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -1054,6 +1054,7 @@ public class SecuritySettings extends SettingsPreferenceFragment static boolean canChangeRequireCredentialBeforeStartup(Context context) { DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); return UserManager.get(context).isAdminUser() && UserManager.get(context).isPrimaryUser() && LockPatternUtils.isDeviceEncryptionEnabled() && !dpm.getDoNotAskCredentialsOnBoot(); } Loading Loading
src/com/android/settings/ChooseLockGeneric.java +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ public class ChooseLockGeneric extends SettingsActivity { } } else if (requestCode == CHOOSE_LOCK_REQUEST || requestCode == ENABLE_ENCRYPTION_REQUEST) { if (resultCode != RESULT_CANCELED) { if (resultCode != RESULT_CANCELED || mForChangeCredRequiredForBoot) { getActivity().setResult(resultCode, data); finish(); } Loading
src/com/android/settings/SaveChosenLockWorkerBase.java +5 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.settings; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; Loading Loading @@ -70,7 +71,10 @@ abstract class SaveChosenLockWorkerBase extends Fragment { mUtils.setSeparateProfileChallengeEnabled(mUserId, true); mWasSecureBefore = mUtils.isSecure(mUserId); if (UserManager.get(getContext()).getUserInfo(mUserId).isPrimary()) { Context context = getContext(); // If context is null, we're being invoked to change the setCredentialRequiredToDecrypt, // and we made sure that this is the primary user already. if (context == null || UserManager.get(context).getUserInfo(mUserId).isPrimary()) { mUtils.setCredentialRequiredToDecrypt(credentialRequired); } Loading
src/com/android/settings/SecuritySettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -1054,6 +1054,7 @@ public class SecuritySettings extends SettingsPreferenceFragment static boolean canChangeRequireCredentialBeforeStartup(Context context) { DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); return UserManager.get(context).isAdminUser() && UserManager.get(context).isPrimaryUser() && LockPatternUtils.isDeviceEncryptionEnabled() && !dpm.getDoNotAskCredentialsOnBoot(); } Loading