am 0e534383: am a6b7c5a7: am 4142d9b0: am 7d96dc6d: Merge "Fix getStorageEncryptionStatus() in DevicePolicyManager" into lmp-dev
* commit '0e5343833f74e2019f2466f0f854a99e9226279b': Fix getStorageEncryptionStatus() in DevicePolicyManager
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