Merge branch 'delete-device' into 'master'

Fix test failure

See merge request entgra/carbon-device-mgt-plugins!53
revert-dabc3590
Charitha Goonetilleke 6 years ago
commit df5e833f77

@ -582,10 +582,12 @@ public class AndroidDeviceUtils {
throws DeviceManagementException { throws DeviceManagementException {
try { try {
List<? extends Operation> pendingOperations = getPendingOperations(deviceIdentifier); List<? extends Operation> pendingOperations = getPendingOperations(deviceIdentifier);
if (pendingOperations != null && !pendingOperations.isEmpty()) {
for (Operation operation : pendingOperations) { for (Operation operation : pendingOperations) {
operation.setStatus(Operation.Status.ERROR); operation.setStatus(Operation.Status.ERROR);
AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation); AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation);
} }
}
} catch (OperationManagementException e) { } catch (OperationManagementException e) {
String msg = "Error occurred while retrieving pending operations to update operation statuses of " + String msg = "Error occurred while retrieving pending operations to update operation statuses of " +
"device to be dis-enrolled"; "device to be dis-enrolled";

Loading…
Cancel
Save