From fd7b9850250dc1ed0786bcfee92a222cee7cae70 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Wed, 6 Nov 2019 14:33:21 +0530 Subject: [PATCH] Enterprise unenroll fix --- .../remote.session/RemoteSessionManagementServiceImpl.java | 1 + .../public/js/platform-configuration.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/RemoteSessionManagementServiceImpl.java b/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/RemoteSessionManagementServiceImpl.java index cdd453a48..3b4f6c61f 100644 --- a/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/RemoteSessionManagementServiceImpl.java +++ b/components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session/src/main/java/org/wso2/carbon/device/mgt/extensions/remote.session/RemoteSessionManagementServiceImpl.java @@ -110,6 +110,7 @@ public class RemoteSessionManagementServiceImpl implements RemoteSessionManageme + " , deviceId : " + deviceId); } } catch (OperationManagementException | InvalidDeviceException e) { + log.error("error", e); throw new RemoteSessionManagementException("Error occurred while adding initial operation for the " + "device Type : " + deviceType + " , deviceId : " + deviceId); } catch (DeviceAccessAuthorizationException e) { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js index 48069ebec..b14da8670 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js @@ -479,7 +479,8 @@ $(document).ready(function () { showPopup(); $("a#remove-unenroll-yes-link").click(function () { - var serverDetails = $("input#afw-server-details").val() + "/api/device-mgt/android/v1.0/enterprise/324/unenroll"; + var serverDetails = $("input#afw-server-details").val() + + "/api/android-for-work/v1.0/google/enterprise/unenroll/" + $("input#afw-enterprise-id").val(); var emmToken = $("input#afw-backend-token").val(); unenroll(serverDetails, emmToken); hidePopup();