From cfb6464cbe4de259142837193587a9cdec1130cb Mon Sep 17 00:00:00 2001 From: harshanl Date: Wed, 18 Nov 2015 12:51:54 +0530 Subject: [PATCH] Fixed policy monitoring empty device list issue --- .../mgt/mobile/impl/android/AndroidPolicyMonitoringService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java index 3738d156e..6a03fa962 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java @@ -46,7 +46,7 @@ public class AndroidPolicyMonitoringService implements PolicyMonitoringService { @Override public void notifyDevices(List list) throws PolicyComplianceException { GCMService gcmService = MobileDeviceManagementDataHolder.getInstance().getGCMService(); - if (gcmService.isGCMEnabled()) { + if (gcmService.isGCMEnabled() && !list.isEmpty()) { gcmService.sendNotification("POLICY_BUNDLE", list); } }