From 1d0752f09caff338f5ad8f5525a146e438aea070 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Mon, 19 Dec 2016 08:33:32 +0530 Subject: [PATCH] fixing device name issue in windows8.1 enrollment --- .../windows/api/services/syncml/impl/SyncmlServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/impl/SyncmlServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/impl/SyncmlServiceImpl.java index 4810ffbed..3dfcb4461 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/impl/SyncmlServiceImpl.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/impl/SyncmlServiceImpl.java @@ -325,10 +325,10 @@ public class SyncmlServiceImpl implements SyncmlService { existingProperties.add(deviceModelProperty); existingDevice.setProperties(existingProperties); + existingDevice.setName(deviceName); existingDevice.setDeviceIdentifier(syncmlDocument.getHeader().getSource().getLocURI()); existingDevice.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS); status = WindowsAPIUtils.getDeviceManagementService().modifyEnrollment(existingDevice); - existingDevice.setName(deviceName); // call effective policy for the enrolling device. PolicyManagerService policyManagerService = WindowsAPIUtils.getPolicyManagerService(); policyManagerService.getEffectivePolicy(deviceIdentifier);