From bbc2850509b2e77ddf6e6aeb135635f809dadc9f Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 29 Apr 2016 17:41:22 +0530 Subject: [PATCH] few changes after testing --- .../service/impl/VirtualFireAlarmManagerServiceImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerServiceImpl.java b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerServiceImpl.java index 580d8e7c17..43189aaade 100644 --- a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerServiceImpl.java +++ b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerServiceImpl.java @@ -226,11 +226,7 @@ public class VirtualFireAlarmManagerServiceImpl implements VirtualFireAlarmManag device.setType(VirtualFireAlarmConstants.DEVICE_TYPE); enrolmentInfo.setOwner(APIUtil.getAuthenticatedUser()); device.setEnrolmentInfo(enrolmentInfo); - boolean added = APIUtil.getDeviceManagementService().enrollDevice(device); - if (added) { - APIUtil.registerApiAccessRoles(APIUtil.getAuthenticatedUser()); - } - return added; + return APIUtil.getDeviceManagementService().enrollDevice(device); } catch (DeviceManagementException e) { log.error(e.getMessage(), e); return false;