Merge branch 'fix-event-config' into 'master'

Fix EVENT_CONFIG operation adding to non android devices

See merge request entgra/carbon-device-mgt!719
revert-70ac1926
Inosh Perara 4 years ago
commit 0fc8fc5b3d

@ -53,7 +53,7 @@ public class GroupEventOperationExecutor implements Runnable {
private static final Log log = LogFactory.getLog(GroupEventOperationExecutor.class); private static final Log log = LogFactory.getLog(GroupEventOperationExecutor.class);
private final int groupId; private final int groupId;
private final List<DeviceIdentifier> deviceIdentifiers; private final List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
private final int tenantId; private final int tenantId;
private final String operationCode; private final String operationCode;
private final GeoLocationProviderService geoLocationProviderService; private final GeoLocationProviderService geoLocationProviderService;
@ -62,7 +62,11 @@ public class GroupEventOperationExecutor implements Runnable {
public GroupEventOperationExecutor(int groupId, List<DeviceIdentifier> deviceIdentifiers, int tenantId, String operationCode) { public GroupEventOperationExecutor(int groupId, List<DeviceIdentifier> deviceIdentifiers, int tenantId, String operationCode) {
this.groupId = groupId; this.groupId = groupId;
this.deviceIdentifiers = deviceIdentifiers; for (DeviceIdentifier deviceIdentifier : deviceIdentifiers) {
if (deviceIdentifier.getType().equalsIgnoreCase("android")) {
this.deviceIdentifiers.add(deviceIdentifier);
}
}
this.tenantId = tenantId; this.tenantId = tenantId;
this.operationCode = operationCode; this.operationCode = operationCode;
this.geoLocationProviderService = DeviceManagementDataHolder.getInstance().getGeoLocationProviderService(); this.geoLocationProviderService = DeviceManagementDataHolder.getInstance().getGeoLocationProviderService();

Loading…
Cancel
Save