Disable passphrase change flow encryption screen when not main user
When the user changing passphrase is not the process' user, disable the "Ask for password on device startup" screen, as it makes no sense. Change-Id: I521b5ec8702f7a39b94012a606794e04135e4c75
This commit is contained in:
@@ -215,6 +215,7 @@ public class ChooseLockGeneric extends SettingsActivity {
|
|||||||
private void maybeEnableEncryption(int quality, boolean disabled) {
|
private void maybeEnableEncryption(int quality, boolean disabled) {
|
||||||
DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE);
|
DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE);
|
||||||
if (UserManager.get(getActivity()).isAdminUser()
|
if (UserManager.get(getActivity()).isAdminUser()
|
||||||
|
&& mUserId == UserHandle.myUserId()
|
||||||
&& LockPatternUtils.isDeviceEncryptionEnabled()
|
&& LockPatternUtils.isDeviceEncryptionEnabled()
|
||||||
&& !dpm.getDoNotAskCredentialsOnBoot()) {
|
&& !dpm.getDoNotAskCredentialsOnBoot()) {
|
||||||
mEncryptionRequestQuality = quality;
|
mEncryptionRequestQuality = quality;
|
||||||
|
Reference in New Issue
Block a user