From 81f427f34f924c8a2eed0362abd16ac8c32dd0c3 Mon Sep 17 00:00:00 2001 From: amalhub Date: Tue, 12 Sep 2017 17:05:37 +0530 Subject: [PATCH] App-mgt store removing device type specific impl --- .../mgt/core/impl/SubscriptionManagerImpl.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 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 ebd0b65b61..31c4817bf4 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 @@ -40,8 +40,6 @@ import java.util.List; public class SubscriptionManagerImpl implements SubscriptionManager { private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class); - final private String ANDROID = "android"; - final private String IOS = "ios"; @Override public List installApplicationForDevices(String applicationUUID, @@ -101,8 +99,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { private List installApplication(String applicationUUID, List deviceList) throws ApplicationManagementException { List failedDeviceList = new ArrayList<>(deviceList); - List androidDevices = new ArrayList<>(); - List iosDevices = new ArrayList<>(); + List activeDeviceList = new ArrayList<>(); for (DeviceIdentifier device : deviceList) { org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt .common.DeviceIdentifier(device.getId(), device.getType()); @@ -114,11 +111,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { if (log.isDebugEnabled()) { log.debug("Prepare application install to : " + device.getId()); } - if (device.getType().equals(ANDROID)) { - androidDevices.add(deviceIdentifier); - } else { - iosDevices.add(deviceIdentifier); - } + activeDeviceList.add(deviceIdentifier); DAOFactory.getSubscriptionDAO().addDeviceApplicationMapping(device.getId(), applicationUUID, false); failedDeviceList.remove(device); }