Merge "DOn't save encryption settings when not encrypted" into mnc-dev

This commit is contained in:
Paul Lawrence
2015-05-15 22:22:18 +00:00
committed by Android (Google) Code Review

View File

@@ -1097,8 +1097,11 @@ public class LockPatternUtils {
Log.w(TAG, "Only device owner may call setCredentialRequiredForDecrypt()");
return;
}
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0);
if (isDeviceEncryptionEnabled()){
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0);
}
}
private boolean isDoNotAskCredentialsOnBootSet() {