标签:android
最近在做录制视频功能,在找一些资料时发现 要判断是否支持闪关灯,在这记录下来,怕以后忘记
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;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:android
原文地址:http://blog.csdn.net/coderinchina/article/details/47658251