private static EnumSet<IDevice.HardwareFeature> getRequiredHardwareFeatures( List<UsesFeature> requiredFeatures) { // Currently, this method is hardcoded to only search if the list of required features includes // a watch. // We may not want to search the device for every possible feature, but only a small subset of // important // features, starting with hardware type watch.. for (UsesFeature feature : requiredFeatures) { AndroidAttributeValue<String> name = feature.getName(); if (name != null && UsesFeature.HARDWARE_TYPE_WATCH.equals(name.getStringValue())) { return EnumSet.of(IDevice.HardwareFeature.WATCH); } } return EnumSet.noneOf(IDevice.HardwareFeature.class); }
public String getAndroidAppName(Manifest manifest) { if (manifest == null || manifest.getXmlTag() == null || manifest.getXmlTag().getAttribute(ANDROID_APP_NAME) == null) { return null; } String name; if (manifest != null && manifest.getApplication() != null && manifest.getApplication().getName() != null) { AndroidAttributeValue<PsiClass> t = manifest.getApplication().getName(); if (t != null) { PsiClass valur = t.getValue(); if (valur != null) { name = valur.getName(); return name; } else return null; } else return null; } else return null; }