From 77f7792bc791ed8376593c3b75f9da7fe659cd74 Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Mon, 10 Sep 2018 10:31:10 +0530 Subject: [PATCH] Fix wso2/product-iots#1863 --- .../core/operation/mgt/OperationManagerImpl.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 5b7de442051..7ca0d0424f1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -476,6 +476,19 @@ public class OperationManagerImpl implements OperationManager { } } + private void sendNotification(Operation operation, DeviceIdentifier deviceId) { + NotificationStrategy notificationStrategy = getNotificationStrategy(); + if (notificationStrategy != null) { + try { + notificationStrategy.execute(new NotificationContext(deviceId, operation)); + } catch (PushNotificationExecutionFailedException e) { + log.error("Error occurred while sending push notifications to " + + deviceId.getType() + " device carrying id '" + + deviceId + "'", e); + } + } + } + private List getActivityStatus(DeviceIDHolder deviceIdValidationResult, DeviceIDHolder deviceAuthResult, String deviceType) { List activityStatuses = new ArrayList<>();