Improve Android enterprise app install

This commit is contained in:
lasanthaDLPDS 2019-12-05 07:15:52 +05:30
parent 01cc7edeff
commit e0c15be870

View File

@ -282,11 +282,8 @@ public class AndroidEnterpriseUtils {
if (productListResponse != null && productListResponse.getProduct() != null
&& !productListResponse.getProduct().isEmpty()) {
List<String> packageNamesOfApps = new ArrayList<>();
for (Product product1 : productListResponse.getProduct()) {
String s = (product1.getProductId().replaceFirst("app:", ""));
packageNamesOfApps.add(s);
}
List<String> packageNamesOfApps = productListResponse.getProduct().stream()
.map(product -> (product.getProductId().replaceFirst("app:", ""))).collect(Collectors.toList());
List<Application> existingApps = applicationManager.getApplications(packageNamesOfApps);
List<Product> products = productListResponse.getProduct();