Fix web clip uninstallation issues in ios

feature/appm-store/pbac
Saad Sahibjan 5 years ago
parent bea11b7d81
commit 7437545b0d

@ -985,6 +985,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) { } else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) {
app.setType(mobileAppType); app.setType(mobileAppType);
app.setIdentifier(application.getPackageName()); app.setIdentifier(application.getPackageName());
app.setLocation(application.getApplicationReleases().get(0).getInstallerPath());
return MDMIOSOperationUtil.createAppUninstallOperation(app); return MDMIOSOperationUtil.createAppUninstallOperation(app);
} else { } else {
String msg = "Invalid Action is found. Action: " + action; String msg = "Invalid Action is found. Action: " + action;

@ -25,6 +25,7 @@ import java.io.Serializable;
public class RemoveApplication implements Serializable { public class RemoveApplication implements Serializable {
private String bundleId; private String bundleId;
private String url;
public String getBundleId() { public String getBundleId() {
return bundleId; return bundleId;
@ -34,6 +35,14 @@ public class RemoveApplication implements Serializable {
this.bundleId = bundleId; this.bundleId = bundleId;
} }
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String toJSON() { public String toJSON() {
Gson gson = new Gson(); Gson gson = new Gson();
return gson.toJson(this); return gson.toJson(this);

@ -96,9 +96,9 @@ public class MDMIOSOperationUtil {
operation.setCode(MDMAppConstants.IOSConstants.OPCODE_REMOVE_APPLICATION); operation.setCode(MDMAppConstants.IOSConstants.OPCODE_REMOVE_APPLICATION);
operation.setType(Operation.Type.PROFILE); operation.setType(Operation.Type.PROFILE);
RemoveApplication removeApplication = RemoveApplication removeApplication = new RemoveApplication();
new RemoveApplication();
removeApplication.setBundleId(application.getIdentifier()); removeApplication.setBundleId(application.getIdentifier());
removeApplication.setUrl(application.getLocation());
operation.setPayLoad(removeApplication.toJSON()); operation.setPayLoad(removeApplication.toJSON());
return operation; return operation;

Loading…
Cancel
Save