Modify setting app type

merge-requests/120/head
Saad Sahibjan 5 years ago
parent c9c4d7a64b
commit 857f9057d3

@ -459,9 +459,10 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
//todo rethink and modify the {@link MobileApp} usage //todo rethink and modify the {@link MobileApp} usage
MobileApp mobileApp = new MobileApp(); MobileApp mobileApp = new MobileApp();
MobileAppTypes mobileAppType = MobileAppTypes.valueOf(application.getType());
if (DeviceTypes.ANDROID.toString().equalsIgnoreCase(deviceType)) { if (DeviceTypes.ANDROID.toString().equalsIgnoreCase(deviceType)) {
if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) { if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) {
mobileApp.setType(MobileAppTypes.ENTERPRISE); mobileApp.setType(mobileAppType);
mobileApp.setLocation(application.getApplicationReleases().get(0).getInstallerPath()); mobileApp.setLocation(application.getApplicationReleases().get(0).getInstallerPath());
return MDMAndroidOperationUtil.createInstallAppOperation(mobileApp); return MDMAndroidOperationUtil.createInstallAppOperation(mobileApp);
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) { } else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) {

@ -48,12 +48,9 @@ public class MDMAndroidOperationUtil {
switch (application.getType()) { switch (application.getType()) {
case ENTERPRISE: case ENTERPRISE:
EnterpriseApplication enterpriseApplication = EnterpriseApplication enterpriseApplication = new EnterpriseApplication();
new EnterpriseApplication();
enterpriseApplication.setType(application.getType().toString()); enterpriseApplication.setType(application.getType().toString());
//TODO: replace needs to be removed after doing the proper config update in application-mgt.xml enterpriseApplication.setUrl(application.getLocation());
enterpriseApplication.setUrl(application.getLocation().replace("https://localhost:9443",
"http://192.168.8.6:9763"));
operation.setPayLoad(enterpriseApplication.toJSON()); operation.setPayLoad(enterpriseApplication.toJSON());
break; break;
case PUBLIC: case PUBLIC:

Loading…
Cancel
Save