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 03726cbf6..c3b16e75e 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); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java index b23956885..630baf822 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java @@ -45,6 +45,7 @@ import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.StartupOperationConfig; +import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.AmbiguousConfigurationException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceConfiguration; @@ -179,7 +180,8 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return null; } - @Override public Device getDevice(DeviceData deviceData, boolean b) throws DeviceManagementException { + @Override + public Device getDevice(DeviceData deviceData, boolean b) throws DeviceManagementException { return null; } @@ -541,12 +543,14 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return null; } - @Override public List getFilteredActivities(String operationCode, int limit, int offset) + @Override + public List getFilteredActivities(String operationCode, int limit, int offset) throws OperationManagementException { return null; } - @Override public int getTotalCountOfFilteredActivities(String operationCode) throws OperationManagementException { + @Override + public int getTotalCountOfFilteredActivities(String operationCode) throws OperationManagementException { return 0; } @@ -670,33 +674,40 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return false; } - @Override public boolean addDeviceTypeVersion(DeviceTypeVersion deviceTypeVersion) + @Override + public boolean addDeviceTypeVersion(DeviceTypeVersion deviceTypeVersion) throws DeviceManagementException { return false; } - @Override public List getDeviceTypeVersions(String s) throws DeviceManagementException { + @Override + public List getDeviceTypeVersions(String s) throws DeviceManagementException { return null; } - @Override public boolean updateDeviceTypeVersion(DeviceTypeVersion deviceTypeVersion) + @Override + public boolean updateDeviceTypeVersion(DeviceTypeVersion deviceTypeVersion) throws DeviceManagementException { return false; } - @Override public boolean isDeviceTypeVersionChangeAuthorized(String s, String s1) throws DeviceManagementException { + @Override + public boolean isDeviceTypeVersionChangeAuthorized(String s, String s1) throws DeviceManagementException { return false; } - @Override public DeviceTypeVersion getDeviceTypeVersion(String s, String s1) throws DeviceManagementException { + @Override + public DeviceTypeVersion getDeviceTypeVersion(String s, String s1) throws DeviceManagementException { return null; } - @Override public boolean deleteDeviceTypeVersions(DeviceType deviceType) throws DeviceManagementException { + @Override + public boolean deleteDeviceTypeVersions(DeviceType deviceType) throws DeviceManagementException { return false; } - @Override public void disEnrollDevices(List list) throws DeviceManagementException { + @Override + public void disEnrollDevices(List list) throws DeviceManagementException { } @@ -719,11 +730,26 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return null; } - @Override public PaginationResult getAppSubscribedDevices(int i, int i1, List list, String s) + @Override + public PaginationResult getAppSubscribedDevices(int i, int i1, List list, String s) throws DeviceManagementException { return null; } @Override - public boolean deleteDevices(List deviceIdentifiers) throws DeviceManagementException, InvalidDeviceException {return false;} + public PaginationResult getApplications(PaginationRequest paginationRequest) + throws ApplicationManagementException, DeviceTypeNotFoundException { + return null; + } + + @Override + public List getAppVersions(String s) throws ApplicationManagementException { + return null; + } + + @Override + public boolean deleteDevices(List deviceIdentifiers) + throws DeviceManagementException, InvalidDeviceException { + return false; + } }