From e0c15be8708c6b7a84a6dd4c5b935f2fc3dbf688 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Thu, 5 Dec 2019 07:15:52 +0530 Subject: [PATCH 1/2] Improve Android enterprise app install --- .../mdm/services/android/util/AndroidEnterpriseUtils.java | 7 ++----- 1 file changed, 2 insertions(+), 5 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 d0d88d1fa..6bd4e0be8 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,11 +282,8 @@ public class AndroidEnterpriseUtils { if (productListResponse != null && productListResponse.getProduct() != null && !productListResponse.getProduct().isEmpty()) { - List packageNamesOfApps = new ArrayList<>(); - for (Product product1 : productListResponse.getProduct()) { - String s = (product1.getProductId().replaceFirst("app:", "")); - packageNamesOfApps.add(s); - } + List packageNamesOfApps = productListResponse.getProduct().stream() + .map(product -> (product.getProductId().replaceFirst("app:", ""))).collect(Collectors.toList()); List existingApps = applicationManager.getApplications(packageNamesOfApps); List products = productListResponse.getProduct(); From 082f2484f408b701b418256e50d1102cae3caafb Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Tue, 10 Dec 2019 09:21:08 +0530 Subject: [PATCH 2/2] Bump dependency versions to dev versions --- .../mdm/services/android/util/AndroidEnterpriseUtils.java | 7 +++++-- pom.xml | 2 +- 2 files changed, 6 insertions(+), 3 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(); diff --git a/pom.xml b/pom.xml index 794dedbde..37e1c854f 100644 --- a/pom.xml +++ b/pom.xml @@ -1204,7 +1204,7 @@ - 4.1.5 + 4.1.6-SNAPSHOT [4.0.0, 5.0.0)