merge-requests/1/head
hasuniea 9 years ago
commit a1b258a99a

@ -118,8 +118,8 @@ public class AndroidDeviceManager implements DeviceManager {
JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class); JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class);
Unmarshaller unmarshaller = context.createUnmarshaller(); Unmarshaller unmarshaller = context.createUnmarshaller();
return (TenantConfiguration) unmarshaller.unmarshal( return (TenantConfiguration) unmarshaller.unmarshal(
new StringReader(new String((byte[]) resource.getContent(), Charset new StringReader(new String((byte[]) resource.getContent(), Charset.
.forName(MobilePluginConstants.CHARSET_UTF8)))); forName(MobilePluginConstants.CHARSET_UTF8))));
} }
return new TenantConfiguration(); return new TenantConfiguration();
} catch (MobileDeviceMgtPluginException e) { } catch (MobileDeviceMgtPluginException e) {
@ -161,7 +161,6 @@ public class AndroidDeviceManager implements DeviceManager {
} }
String msg = String msg =
"Error while enrolling the Android device : " + device.getDeviceIdentifier(); "Error while enrolling the Android device : " + device.getDeviceIdentifier();
log.error(msg, e);
throw new DeviceManagementException(msg, e); throw new DeviceManagementException(msg, e);
} }
return status; return status;
@ -188,7 +187,6 @@ public class AndroidDeviceManager implements DeviceManager {
} }
String msg = "Error while updating the enrollment of the Android device : " + String msg = "Error while updating the enrollment of the Android device : " +
device.getDeviceIdentifier(); device.getDeviceIdentifier();
log.error(msg, e);
throw new DeviceManagementException(msg, e); throw new DeviceManagementException(msg, e);
} }
return status; return status;
@ -213,7 +211,6 @@ public class AndroidDeviceManager implements DeviceManager {
log.warn(msg, mobileDAOEx); log.warn(msg, mobileDAOEx);
} }
String msg = "Error while removing the Android device : " + deviceId.getId(); String msg = "Error while removing the Android device : " + deviceId.getId();
log.error(msg, e);
throw new DeviceManagementException(msg, e); throw new DeviceManagementException(msg, e);
} }
return status; return status;
@ -234,7 +231,6 @@ public class AndroidDeviceManager implements DeviceManager {
} catch (MobileDeviceManagementDAOException e) { } catch (MobileDeviceManagementDAOException e) {
String msg = "Error while checking the enrollment status of Android device : " + String msg = "Error while checking the enrollment status of Android device : " +
deviceId.getId(); deviceId.getId();
log.error(msg, e);
throw new DeviceManagementException(msg, e); throw new DeviceManagementException(msg, e);
} }
return isEnrolled; return isEnrolled;
@ -288,8 +284,8 @@ public class AndroidDeviceManager implements DeviceManager {
@Override @Override
public License getLicense(String languageCode) throws LicenseManagementException { public License getLicense(String languageCode) throws LicenseManagementException {
return licenseManager return licenseManager.
.getLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, languageCode); getLicense(AndroidDeviceManagementService.DEVICE_TYPE_ANDROID, languageCode);
} }
@Override @Override
@ -320,8 +316,7 @@ public class AndroidDeviceManager implements DeviceManager {
"updating the details of Android device : " + device.getDeviceIdentifier()); "updating the details of Android device : " + device.getDeviceIdentifier());
} }
AndroidDAOFactory.beginTransaction(); AndroidDAOFactory.beginTransaction();
status = daoFactory.getMobileDeviceDAO() status = daoFactory.getMobileDeviceDAO().updateMobileDevice(existingMobileDevice);
.updateMobileDevice(existingMobileDevice);
AndroidDAOFactory.commitTransaction(); AndroidDAOFactory.commitTransaction();
} catch (MobileDeviceManagementDAOException e) { } catch (MobileDeviceManagementDAOException e) {
try { try {

@ -72,7 +72,7 @@ public class AndroidPolicyMonitoringService implements PolicyMonitoringService {
complianceData.setComplianceFeatures(complianceFeatures); complianceData.setComplianceFeatures(complianceFeatures);
for (ComplianceFeature cf : complianceFeatures) { for (ComplianceFeature cf : complianceFeatures) {
if (!cf.isCompliance()) { if (!cf.isCompliant()) {
complianceData.setStatus(false); complianceData.setStatus(false);
break; break;
} }

@ -26,8 +26,6 @@ import java.util.Map;
public class AndroidUtils { public class AndroidUtils {
public static String getDeviceProperty(Map<String, String> deviceProperties, String property) { public static String getDeviceProperty(Map<String, String> deviceProperties, String property) {
return deviceProperties.get(property);
String deviceProperty = deviceProperties.get(property);
return deviceProperty;
} }
} }

Loading…
Cancel
Save