From 0dbd4bf2dbb408bf99caf55a3d4fc8ca8aecee84 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Fri, 18 Oct 2019 17:41:00 +0530 Subject: [PATCH] fix compilation error --- .../mgt/core/impl/SubscriptionManagerImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 8c6c69f417..c59407b1ba 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;