Loading services/java/com/android/server/DevicePolicyManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.os.RemoteCallback; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.provider.Settings; import android.util.PrintWriterPrinter; import android.util.Printer; Loading Loading @@ -1925,8 +1926,15 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { * {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}. */ private int getEncryptionStatus() { String status = SystemProperties.get("ro.crypto.state", "unsupported"); if ("encrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE; } else if ("unencrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } else { return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED; } } /** * Hook to low-levels: If needed, record the new admin setting for encryption. Loading Loading
services/java/com/android/server/DevicePolicyManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.os.RemoteCallback; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.provider.Settings; import android.util.PrintWriterPrinter; import android.util.Printer; Loading Loading @@ -1925,8 +1926,15 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { * {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}. */ private int getEncryptionStatus() { String status = SystemProperties.get("ro.crypto.state", "unsupported"); if ("encrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE; } else if ("unencrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } else { return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED; } } /** * Hook to low-levels: If needed, record the new admin setting for encryption. Loading