diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java index 8c6c69f4175..c59407b1baf 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -642,6 +642,16 @@ public class SubscriptionManagerImpl implements SubscriptionManager { } } + /** + * This method is responsible to add operation on given devices. + * + * @param applicationDTO application. + * @param deviceIdentifierList list of device identifiers. + * @param deviceType device type + * @param action action e.g :- INSTALL, UNINSTALL + * @return {@link Activity} + * @throws ApplicationManagementException if found an invalid device. + */ private Activity addAppOperationOnDevices(ApplicationDTO applicationDTO, List deviceIdentifierList, String deviceType, String action) throws ApplicationManagementException { @@ -664,7 +674,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager { private Operation generateOperationPayloadByDeviceType(String deviceType, Application application, String action) throws ApplicationManagementException { try { - //todo rethink and modify the {@link App} usage if (ApplicationType.CUSTOM.toString().equalsIgnoreCase(application.getType())) { ProfileOperation operation = new ProfileOperation(); if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) { @@ -720,7 +729,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { return MDMIOSOperationUtil.createInstallAppOperation(app); } else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) { app.setType(mobileAppType); - app.setAppIdentifier(application.getPackageName()); + app.setIdentifier(application.getPackageName()); return MDMIOSOperationUtil.createAppUninstallOperation(app); } else { String msg = "Invalid Action is found. Action: " + action;