From 3ca303cdb5ef52a13109e404e8847813cd2d51af Mon Sep 17 00:00:00 2001 From: Dharmakeerthi Lasantha Date: Fri, 1 Nov 2019 13:11:11 +0000 Subject: [PATCH] Fix app installing issue in kiosk --- .../dao/impl/application/SQLServerApplicationDAOImpl.java | 4 ++-- .../carbon/device/mgt/core/util/MDMAndroidOperationUtil.java | 1 + 2 files changed, 3 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/dao/impl/application/SQLServerApplicationDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java index 3b247d886aa..7ca05d12a6a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java @@ -119,11 +119,11 @@ public class SQLServerApplicationDAOImpl extends GenericApplicationDAOImpl { } if (filter.getLimit() == -1) { - sql = sql.replace("OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", ""); + sql = sql.replace("ORDER BY ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", ""); } String sortingOrder = "ASC"; - if (!StringUtils.isEmpty(filter.getSortBy() )) { + if (!StringUtils.isEmpty(filter.getSortBy())) { sortingOrder = filter.getSortBy(); } sql += " ORDER BY APP_ID " + sortingOrder; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/MDMAndroidOperationUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/MDMAndroidOperationUtil.java index f9c90d6d1ae..14dbaea9ed0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/MDMAndroidOperationUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/MDMAndroidOperationUtil.java @@ -51,6 +51,7 @@ public class MDMAndroidOperationUtil { EnterpriseApplication enterpriseApplication = new EnterpriseApplication(); enterpriseApplication.setType(application.getType().toString()); enterpriseApplication.setUrl(application.getLocation()); + enterpriseApplication.setAppIdentifier(application.getIdentifier()); operation.setPayLoad(enterpriseApplication.toJSON()); break; case PUBLIC: