summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2014-10-17 09:34:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-17 09:34:37 +0000
commit4142d9b01d6485afddf7567f1da9959361d6a687 (patch)
tree69687fc3bc6236f59c1e2c85a007825805ced5d9
parentf0c1af8e4b00a973914a1a3fe22f6d0f98fb704f (diff)
parent7d96dc6d98774ff9b7cf1370f9a5508c4eac6a85 (diff)
downloadframeworks_base-4142d9b01d6485afddf7567f1da9959361d6a687.zip
frameworks_base-4142d9b01d6485afddf7567f1da9959361d6a687.tar.gz
frameworks_base-4142d9b01d6485afddf7567f1da9959361d6a687.tar.bz2
am 7d96dc6d: Merge "Fix getStorageEncryptionStatus() in DevicePolicyManager" into lmp-dev
* commit '7d96dc6d98774ff9b7cf1370f9a5508c4eac6a85': Fix getStorageEncryptionStatus() in DevicePolicyManager
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index af4ae44..fc5c053 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -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 {