Merge branch 'subs-operation-status-fix' into 'master'

Fix operation status issue in app subscription

See merge request entgra/carbon-device-mgt!818
temp
Pahansith Gunathilake 3 years ago
commit 26ef9bcf01

@ -44,6 +44,12 @@ public class OperationStatusBean {
) )
private String status; private String status;
@ApiModelProperty(
name = "operationCode",
value = "Operation Code."
)
private String operationCode;
public int getOperationId() { public int getOperationId() {
return operationId; return operationId;
} }
@ -59,4 +65,12 @@ public class OperationStatusBean {
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getOperationCode() {
return operationCode;
}
public void setOperationCode(String operationCode) {
this.operationCode = operationCode;
}
} }

@ -1417,6 +1417,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
} }
Operation operation = DeviceMgtAPIUtils.validateOperationStatusBean(operationStatusBean); Operation operation = DeviceMgtAPIUtils.validateOperationStatusBean(operationStatusBean);
operation.setId(operationStatusBean.getOperationId()); operation.setId(operationStatusBean.getOperationId());
operation.setCode(operationStatusBean.getOperationCode());
DeviceMgtAPIUtils.getDeviceManagementService().updateOperation(device, operation); DeviceMgtAPIUtils.getDeviceManagementService().updateOperation(device, operation);
if (MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION.equals(operation.getCode()) || if (MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION.equals(operation.getCode()) ||

Loading…
Cancel
Save