Android examples for android.hardware:Camera Focus
is Camera Focus Area Supported
import java.util.List; import android.hardware.Camera.Parameters; public class Main { public static boolean isFocusAreaSupported(Parameters params) { return (params.getMaxNumFocusAreas() > 0 && isSupported(Parameters.FOCUS_MODE_AUTO, params.getSupportedFocusModes())); }/*from w ww .j ava2 s . c o m*/ public static boolean isSupported(String value, List<String> supported) { return supported == null ? false : supported.indexOf(value) >= 0; } }