private ComplianceFeature checkEncryptPolicy(org.wso2.emm.agent.beans.Operation operation){
  boolean encryptStatus=(devicePolicyManager.getStorageEncryptionStatus() != devicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED && devicePolicyManager.getStorageEncryptionStatus() != devicePolicyManager.ENCRYPTION_STATUS_INACTIVE);
  if ((operation.isEnabled() && encryptStatus) || (!operation.isEnabled() && !encryptStatus)) {
    policy.setCompliance(true);
  }
 else {
    policy.setCompliance(false);
    policy.setMessage(resources.getString(R.string.error_encrypt_policy));
  }
  return policy;
}

private ComplianceFeature checkEncryptPolicy ( org . wso2 . emm . agent . beans . Operation operation ) { boolean encryptStatus = ( devicePolicyManager . getStorageEncryptionStatus ( ) != devicePolicyManager . ENCRYPTION_STATUS_UNSUPPORTED && devicePolicyManager . getStorageEncryptionStatus ( ) != devicePolicyManager . ENCRYPTION_STATUS_INACTIVE ) ; if ( ( operation . isEnabled ( ) && encryptStatus ) || ( ! operation . isEnabled ( ) && ! encryptStatus ) ) { policy . setCompliance ( true ) ; } else { policy . setCompliance ( false ) ; policy . setMessage ( resources . getString ( R . string . error_encrypt_policy ) ) ; } return policy ; }
checks device encrypt policy on the device ( device external storage encryption ) .
