标签:记录 [] nbsp inf 支持 art false pack manager
近期在做录制视频功能,在找一些资料时发现 要推断是否支持闪关灯,在这记录下来,怕以后忘记
public static boolean isSupportCameraLedFlash(PackageManager pm) {
if (pm != null) {
FeatureInfo[] features = pm.getSystemAvailableFeatures();
if (features != null) {
for (FeatureInfo f : features) {
if (f != null && PackageManager.FEATURE_CAMERA_FLASH.equals(f.name))
return true;
}
}
}
return false;
}
标签:记录 [] nbsp inf 支持 art false pack manager
原文地址:http://www.cnblogs.com/cxchanpin/p/7043424.html