is Camera Focus Area Supported - Android android.hardware

Android examples for android.hardware:Camera Focus

Description

is Camera Focus Area Supported

Demo Code

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;
  }

}

Related Tutorials