camera = Camera.open();
if (camera != null){
Camera.Parameters params = camera.getParameters();
camera.setDisplayOrientation(90);
List<String> list = params.getSupportedFocusModes();
if (list.contains(Camera.Parameters.FOCUS_MODE_AUTO)) {//自动对焦,完毕
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
}
params.set("orientation", "portrait");
camera.setParameters(params);
注意:还有autofouseable的监听,但是暂时还不知道是干什么的!