mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
This commit is contained in:
parent
20a89a8105
commit
c1184167df
@ -238,6 +238,20 @@ public class AndroidDeviceUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation);
|
AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation);
|
||||||
|
// This has to be bellow other if blocks, since updateOperation would fail if we execute against a disenrolled
|
||||||
|
// device.
|
||||||
|
if (!Operation.Status.ERROR.equals(operation.getStatus()) && AndroidConstants.
|
||||||
|
OperationCodes.WIPE_DATA.equals(operation.getCode())) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Received wipe data from device '" + deviceId + "'");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
AndroidAPIUtils.getDeviceManagementService().disenrollDevice(deviceIdentifier);
|
||||||
|
} catch (DeviceManagementException e) {
|
||||||
|
throw new OperationManagementException("Error occurred while unenrolling the device.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<? extends Operation> getPendingOperations
|
public static List<? extends Operation> getPendingOperations
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user