From 807c8649481038bacbabc3de4e424a23710f09ba Mon Sep 17 00:00:00 2001 From: "tcdlpds@gmail.com" Date: Sat, 15 Feb 2020 03:24:14 +0530 Subject: [PATCH] Improve Android enrollment QR code generating logic --- .../android/core/impl/DeviceTypeCommonServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/main/java/org/wso2/carbon/device/mgt/mobile/android/core/impl/DeviceTypeCommonServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/main/java/org/wso2/carbon/device/mgt/mobile/android/core/impl/DeviceTypeCommonServiceImpl.java index 03726cbf62..c3b16e75e8 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/main/java/org/wso2/carbon/device/mgt/mobile/android/core/impl/DeviceTypeCommonServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/main/java/org/wso2/carbon/device/mgt/mobile/android/core/impl/DeviceTypeCommonServiceImpl.java @@ -72,10 +72,6 @@ public class DeviceTypeCommonServiceImpl implements DeviceTypeCommonService { } for (ConfigurationEntry configEntry : platformConfiguration.getConfiguration()) { - if (AndroidConstants.PlatformConfigs.DefaultConfigs.DEFAULT_OWNERSHIP.equals(configEntry.getName())) { - defaultQREnrollmentPayload - .put(AndroidConstants.PlatformConfigs.DefaultConfigs.DEFAULT_OWNERSHIP, configEntry.getValue()); - } if (AndroidConstants.PlatformConfigs.DefaultConfigs.SERVER_IP.equals(configEntry.getName())) { defaultQREnrollmentPayload .put(AndroidConstants.PlatformConfigs.DefaultConfigs.SERVER_IP, configEntry.getValue()); @@ -110,6 +106,8 @@ public class DeviceTypeCommonServiceImpl implements DeviceTypeCommonService { } + defaultQREnrollmentPayload + .put(AndroidConstants.PlatformConfigs.DefaultConfigs.DEFAULT_OWNERSHIP, ownershipType.toUpperCase()); defaultQREnrollmentPayload.put(AndroidConstants.PlatformConfigs.DefaultConfigs.ACCESS_TOKEN, accessToken); qrEnrollmentPayload .put(AndroidConstants.PlatformConfigs.KioskConfigs.ANDROID_EXTRA, defaultQREnrollmentPayload);