Loading core/java/com/android/internal/widget/LockPatternUtils.java +1 −4 Original line number Diff line number Diff line Loading @@ -728,12 +728,9 @@ public class LockPatternUtils { /** Update the encryption password if it is enabled **/ private void updateEncryptionPassword(final int type, final String password) { DevicePolicyManager dpm = getDevicePolicyManager(); if (dpm.getStorageEncryptionStatus(getCurrentOrCallingUserId()) != DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE) { if (!isDeviceEncryptionEnabled()) { return; } final IBinder service = ServiceManager.getService("mount"); if (service == null) { Log.e(TAG, "Could not find the mount service to update the encryption password"); Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −3 Original line number Diff line number Diff line Loading @@ -3390,9 +3390,14 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private int getEncryptionStatus() { String status = SystemProperties.get("ro.crypto.state", "unsupported"); if ("encrypted".equalsIgnoreCase(status)) { final long token = Binder.clearCallingIdentity(); try { return LockPatternUtils.isDeviceEncrypted() ? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE : DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } finally { Binder.restoreCallingIdentity(token); } } else if ("unencrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } else { Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +1 −4 Original line number Diff line number Diff line Loading @@ -728,12 +728,9 @@ public class LockPatternUtils { /** Update the encryption password if it is enabled **/ private void updateEncryptionPassword(final int type, final String password) { DevicePolicyManager dpm = getDevicePolicyManager(); if (dpm.getStorageEncryptionStatus(getCurrentOrCallingUserId()) != DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE) { if (!isDeviceEncryptionEnabled()) { return; } final IBinder service = ServiceManager.getService("mount"); if (service == null) { Log.e(TAG, "Could not find the mount service to update the encryption password"); Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −3 Original line number Diff line number Diff line Loading @@ -3390,9 +3390,14 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private int getEncryptionStatus() { String status = SystemProperties.get("ro.crypto.state", "unsupported"); if ("encrypted".equalsIgnoreCase(status)) { final long token = Binder.clearCallingIdentity(); try { return LockPatternUtils.isDeviceEncrypted() ? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE : DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } finally { Binder.restoreCallingIdentity(token); } } else if ("unencrypted".equalsIgnoreCase(status)) { return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE; } else { Loading