Merge "Fix getStorageEncryptionStatus() in DevicePolicyManager" into lmp-dev
This commit is contained in:
@@ -3390,7 +3390,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
|||||||
private int getEncryptionStatus() {
|
private int getEncryptionStatus() {
|
||||||
String status = SystemProperties.get("ro.crypto.state", "unsupported");
|
String status = SystemProperties.get("ro.crypto.state", "unsupported");
|
||||||
if ("encrypted".equalsIgnoreCase(status)) {
|
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)) {
|
} else if ("unencrypted".equalsIgnoreCase(status)) {
|
||||||
return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
|
return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user