Fix getStorageEncryptionStatus() in DevicePolicyManager
This fixes a bug introduced by a change where the function ignores systems with default encryption where it's disabled. The fix also checks to see if vold thinks the device is secure. Fixes bug 17881324 Change-Id: I2c40f76cf990d90d1a825955aa3b080b21684426
This commit is contained in:
@@ -3390,7 +3390,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
private int getEncryptionStatus() {
|
||||
String status = SystemProperties.get("ro.crypto.state", "unsupported");
|
||||
if ("encrypted".equalsIgnoreCase(status)) {
|
||||
return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
|
||||
return LockPatternUtils.isDeviceEncrypted()
|
||||
? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE
|
||||
: DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
|
||||
} else if ("unencrypted".equalsIgnoreCase(status)) {
|
||||
return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user