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 @Override
public PolicyMonitoringManager getPolicyMonitoringManager() { public PolicyMonitoringManager getPolicyMonitoringManager() {
return null; return policyMonitoringManager;
} }
private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) { private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) {

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

Loading…
Cancel
Save