fixing windows device name issue

revert-70aa11f8
Hasunie 8 years ago
parent 40d8488466
commit 60d1281949

@ -274,7 +274,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
Device currentDevice = deviceDAO.getDevice(deviceIdentifier, tenantId); Device currentDevice = deviceDAO.getDevice(deviceIdentifier, tenantId);
device.setId(currentDevice.getId()); device.setId(currentDevice.getId());
device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId()); device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());
if (device.getName() == null) {
device.setName(currentDevice.getName()); device.setName(currentDevice.getName());
}
deviceDAO.updateDevice(device, tenantId); deviceDAO.updateDevice(device, tenantId);
enrollmentDAO.updateEnrollment(device.getEnrolmentInfo()); enrollmentDAO.updateEnrollment(device.getEnrolmentInfo());
DeviceManagementDAOFactory.commitTransaction(); DeviceManagementDAOFactory.commitTransaction();
@ -1225,7 +1227,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
List<TaskOperation> taskOperations; List<TaskOperation> taskOperations;
Map<String, List<TaskOperation>> deviceTypeSpecificTasks = new HashMap<>(); Map<String, List<TaskOperation>> deviceTypeSpecificTasks = new HashMap<>();
for(DeviceTypeIdentifier dti : deviceManagementServiceMap.keySet()){ for (DeviceTypeIdentifier dti : deviceManagementServiceMap.keySet()) {
dms = deviceManagementServiceMap.get(dti); dms = deviceManagementServiceMap.get(dti);
taskOperations = dms.getTasksForPlatform(); taskOperations = dms.getTasksForPlatform();
if (taskOperations != null) { if (taskOperations != null) {

Loading…
Cancel
Save