Added Valid device list to Activity response

revert-70aa11f8
harshanl 8 years ago
parent a77564ac2d
commit 675843d7f7

@ -185,14 +185,6 @@ public class OperationManagerImpl implements OperationManager {
String deviceType) { String deviceType) {
List<ActivityStatus> activityStatuses = new ArrayList<>(); List<ActivityStatus> activityStatuses = new ArrayList<>();
ActivityStatus activityStatus; ActivityStatus activityStatus;
//Add the valid DeviceIds
for (DeviceIdentifier id : deviceIdValidationResult.getValidDeviceIDList()) {
activityStatus = new ActivityStatus();
activityStatus.setDeviceIdentifier(id);
activityStatus.setStatus(ActivityStatus.Status.PENDING);
activityStatuses.add(activityStatus);
}
//Add the invalid DeviceIds //Add the invalid DeviceIds
for (String id : deviceIdValidationResult.getErrorDeviceIdList()) { for (String id : deviceIdValidationResult.getErrorDeviceIdList()) {
activityStatus = new ActivityStatus(); activityStatus = new ActivityStatus();
@ -208,6 +200,14 @@ public class OperationManagerImpl implements OperationManager {
activityStatus.setStatus(ActivityStatus.Status.UNAUTHORIZED); activityStatus.setStatus(ActivityStatus.Status.UNAUTHORIZED);
activityStatuses.add(activityStatus); activityStatuses.add(activityStatus);
} }
//Add the authorized DeviceIds
for (DeviceIdentifier id : deviceAuthResult.getValidDeviceIDList()) {
activityStatus = new ActivityStatus();
activityStatus.setDeviceIdentifier(id);
activityStatus.setStatus(ActivityStatus.Status.PENDING);
activityStatuses.add(activityStatus);
}
return activityStatuses; return activityStatuses;
} }

Loading…
Cancel
Save