// Path: app/src/main/java/org/hschott/camdroid/OnCameraPreviewListener.java
// public interface AutoFocusManagerAware {
// 	public AutoFocusManager getAutoFocusManager();
// 
// 	public void setAutoFocusManager(AutoFocusManager autoFocusManager);
// }


import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.ImageFormat;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.PreviewCallback;
import android.hardware.Camera.Size;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import org.hschott.camdroid.OnCameraPreviewListener.AutoFocusManagerAware;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
        @Override
        public void onClick(View v) {
            if (CameraPreviewView.this.previewRunning) {
                if (CameraPreviewView.this.mAutoFocusManager != null) {
                    CameraPreviewView.this.mAutoFocusManager.focus();
                }
            }
        }
    };

    private boolean configured = false;

    public CameraPreviewView(Context context) {
        super(context);
        this.initView(context);
    }

    public CameraPreviewView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.initView(context);
    }

    public CameraPreviewView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.initView(context);
    }

    public void addCameraFrameListener(
            OnCameraPreviewListener cameraFrameListener) {
        if (cameraFrameListener instanceof AutoFocusManagerAware) {
// Path: app/src/main/java/org/hschott/camdroid/OnCameraPreviewListener.java
// public interface AutoFocusManagerAware {
// 	public AutoFocusManager getAutoFocusManager();
// 
// 	public void setAutoFocusManager(AutoFocusManager autoFocusManager);
// }


// Path: app/src/main/java/org/hschott/camdroid/CameraPreviewView.java
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.ImageFormat;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.PreviewCallback;
import android.hardware.Camera.Size;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import org.hschott.camdroid.OnCameraPreviewListener.AutoFocusManagerAware;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

        @Override
        public void onClick(View v) {
            if (CameraPreviewView.this.previewRunning) {
                if (CameraPreviewView.this.mAutoFocusManager != null) {
                    CameraPreviewView.this.mAutoFocusManager.focus();
                }
            }
        }
    };

    private boolean configured = false;

    public CameraPreviewView(Context context) {
        super(context);
        this.initView(context);
    }

    public CameraPreviewView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.initView(context);
    }

    public CameraPreviewView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.initView(context);
    }

    public void addCameraFrameListener(
            OnCameraPreviewListener cameraFrameListener) {
        if (cameraFrameListener instanceof AutoFocusManagerAware) {
            AutoFocusManagerAware target = (AutoFocusManagerAware) cameraFrameListener;