private boolean setModulesEnabled(Set<String> codeNames) {
Collection<UpdateElement> toEnable = new HashSet<UpdateElement>();
List<UpdateUnit> allUpdateUnits = UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.MODULE);
for (UpdateUnit unit : allUpdateUnits) {
if (unit.getInstalled() != null) {
UpdateElement el = unit.getInstalled();
if (!el.isEnabled()) {
if (codeNames.contains(el.getCodeName())) {
toEnable.add(el);
}
}
}
}