From eb05fb9a3fdb0bb77b575c2b484bace3c6661e5b Mon Sep 17 00:00:00 2001 From: sandaru Date: Mon, 13 Sep 2021 14:18:29 +0530 Subject: [PATCH] Fix web-clip install issue (cherry picked from commit ebe9842d9a7a3dda8c965c55c55708170bf05682) --- .../device/mgt/core/util/MDMAndroidOperationUtil.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 99cacfd950..a1e5210948 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 @@ -68,7 +68,9 @@ public class MDMAndroidOperationUtil { WebApplication webApplication = new WebApplication(); webApplication.setUrl(application.getLocation()); webApplication.setName(application.getName()); - webApplication.setType(application.getType().toString()); +// webApplication.setType(application.getType().toString()); +// Hard-corded "type" to "webapp". Some agent versions accept only "webapp" as the type. + webApplication.setType("webapp"); webApplication.setProperties(application.getProperties()); operation.setPayLoad(webApplication.toJSON()); break; @@ -111,7 +113,9 @@ public class MDMAndroidOperationUtil { WebApplication webApplication = new WebApplication(); webApplication.setUrl(application.getLocation()); webApplication.setName(application.getName()); - webApplication.setType(application.getType().toString()); +// webApplication.setType(application.getType().toString()); +// Hard-corded "type" to "webapp". Some agent versions accept only "webapp" as the type. + webApplication.setType("webapp"); operation.setPayLoad(webApplication.toJSON()); break; default: