made MonitoringTask to get config from device management service

revert-70aa11f8
ayyoob 8 years ago
parent 09a148d476
commit 20c3940ca4

@ -154,7 +154,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
@Override
public PolicyMonitoringManager getPolicyMonitoringManager() {
return null;
return policyMonitoringManager;
}
private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) {

@ -135,8 +135,11 @@ public class MonitoringTask implements Task {
*/
private boolean isPlatformExist(String deviceType) {
PolicyConfiguration policyConfiguration =
DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration();
return (policyConfiguration.getPlatforms().contains(deviceType));
PolicyMonitoringManager policyMonitoringManager = PolicyManagementDataHolder.getInstance()
.getDeviceManagementService().getPolicyMonitoringManager(deviceType);
if (policyMonitoringManager != null) {
return true;
}
return false;
}
}

Loading…
Cancel
Save