Search in sources :

Example 1 with IOSDevice

use of com.att.aro.datacollector.ioscollector.IOSDevice in project VideoOptimzer by attdevsupport.

the class IOSCollectorImpl method getDevices.

@Override
public IAroDevice[] getDevices(StatusResult status) {
    IAroDevice[] aroDevices = null;
    String[] iosDevices = getDeviceSerialNumber(status);
    if (iosDevices != null && iosDevices.length > 0) {
        aroDevices = new IAroDevice[iosDevices.length];
        int pos = 0;
        for (String udid : iosDevices) {
            if (!udid.isEmpty()) {
                try {
                    aroDevices[pos++] = new IOSDevice(udid);
                } catch (IOException e) {
                    String errorMessage = "Failed to retrieve iOS device data:" + e.getMessage();
                    LOG.error(errorMessage);
                    status.setError(ErrorCodeRegistry.getFailedRetrieveDeviceData(errorMessage));
                }
            }
        }
    }
    return aroDevices;
}
Also used : IAroDevice(com.att.aro.core.mobiledevice.pojo.IAroDevice) IOSDevice(com.att.aro.datacollector.ioscollector.IOSDevice) IOException(java.io.IOException)

Aggregations

IAroDevice (com.att.aro.core.mobiledevice.pojo.IAroDevice)1 IOSDevice (com.att.aro.datacollector.ioscollector.IOSDevice)1 IOException (java.io.IOException)1