updated android featuremgr

revert-dabc3590
harshanl 9 years ago
parent 69269d50ee
commit 1aee8edace

@ -65,7 +65,7 @@ public class AndroidFeatureManager implements FeatureManager {
@Override @Override
public boolean addFeatures(List<Feature> features) throws DeviceManagementException { public boolean addFeatures(List<Feature> features) throws DeviceManagementException {
List<MobileFeature> mobileFeatures = new ArrayList<MobileFeature>(); List<MobileFeature> mobileFeatures = new ArrayList<MobileFeature>();
for (Feature feature:features) { for (Feature feature : features) {
mobileFeatures.add(MobileDeviceManagementUtil.convertToMobileFeature(feature)); mobileFeatures.add(MobileDeviceManagementUtil.convertToMobileFeature(feature));
} }
try { try {
@ -134,8 +134,11 @@ public class AndroidFeatureManager implements FeatureManager {
List<Feature> supportedFeatures = getSupportedFeatures(); List<Feature> supportedFeatures = getSupportedFeatures();
List<Feature> existingFeatures = this.getFeatures(); List<Feature> existingFeatures = this.getFeatures();
List<Feature> missingFeatures = MobileDeviceManagementUtil. List<Feature> missingFeatures = MobileDeviceManagementUtil.
getMissingFeatures(supportedFeatures, existingFeatures); getMissingFeatures(supportedFeatures, existingFeatures);
return this.addFeatures(missingFeatures); if (missingFeatures.size() > 0) {
return this.addFeatures(missingFeatures);
}
return true;
} }
} }

Loading…
Cancel
Save