From 01cc7edeff4ebcd4de0f07c90ff9afefba0c68e7 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Wed, 4 Dec 2019 20:12:57 +0530 Subject: [PATCH] Fix android web app deploying issue --- .../mdm/services/android/util/AndroidEnterpriseUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java index 6bd4e0be8..d0d88d1fa 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java @@ -282,8 +282,11 @@ public class AndroidEnterpriseUtils { if (productListResponse != null && productListResponse.getProduct() != null && !productListResponse.getProduct().isEmpty()) { - List packageNamesOfApps = productListResponse.getProduct().stream() - .map(product -> (product.getProductId().replaceFirst("app:", ""))).collect(Collectors.toList()); + List packageNamesOfApps = new ArrayList<>(); + for (Product product1 : productListResponse.getProduct()) { + String s = (product1.getProductId().replaceFirst("app:", "")); + packageNamesOfApps.add(s); + } List existingApps = applicationManager.getApplications(packageNamesOfApps); List products = productListResponse.getProduct();