mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Modify setting app type
This commit is contained in:
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…
Reference in New Issue
Block a user