// Path: app/src/main/java/xyz/kongjing/prerect/callback/OnCaptureCallback.java
// public interface OnCaptureCallback {
// 
// 	public void onCapture(byte[] jpgdata);
// }


import android.util.Log;
import xyz.kongjing.prerect.callback.OnCaptureCallback;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import android.content.Context;
import android.graphics.ImageFormat;
import android.graphics.Point;
import android.hardware.Camera;
import android.hardware.Camera.AutoFocusCallback;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.hardware.Camera.Size;
import android.media.AudioManager;
import android.media.ToneGenerator;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
			parameters.set("zoom", String.valueOf(tenDesiredZoom / 10.0));
		}
		if (takingPictureZoomMaxString != null) {
			parameters.set("taking-picture-zoom", tenDesiredZoom);
		}
	}

	/**
	 * 设置照片尺寸为最接近指定尺寸
	 * 
	 * @param list
	 * @return
	 */
	private void setPicutreSize(List<Size> list, int width, int height) {
		int approach = Integer.MAX_VALUE;

		for (Size size : list) {
			int temp = Math.abs(size.width - width + size.height - height);
			if (approach > temp) {
				approach = temp;
				pictureSize = size;
			}

		}

	}

	// 拍照
	private ToneGenerator tone;

// Path: app/src/main/java/xyz/kongjing/prerect/callback/OnCaptureCallback.java
// public interface OnCaptureCallback {
// 
// 	public void onCapture(byte[] jpgdata);
// }


// Path: app/src/main/java/xyz/kongjing/prerect/camera/CameraConfigurationManager.java
import android.util.Log;
import xyz.kongjing.prerect.callback.OnCaptureCallback;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import android.content.Context;
import android.graphics.ImageFormat;
import android.graphics.Point;
import android.hardware.Camera;
import android.hardware.Camera.AutoFocusCallback;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.hardware.Camera.Size;
import android.media.AudioManager;
import android.media.ToneGenerator;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;

			parameters.set("zoom", String.valueOf(tenDesiredZoom / 10.0));
		}
		if (takingPictureZoomMaxString != null) {
			parameters.set("taking-picture-zoom", tenDesiredZoom);
		}
	}

	/**
	 * 设置照片尺寸为最接近指定尺寸
	 * 
	 * @param list
	 * @return
	 */
	private void setPicutreSize(List<Size> list, int width, int height) {
		int approach = Integer.MAX_VALUE;

		for (Size size : list) {
			int temp = Math.abs(size.width - width + size.height - height);
			if (approach > temp) {
				approach = temp;
				pictureSize = size;
			}

		}

	}

	// 拍照
	private ToneGenerator tone;

	public void tackPicture(Camera camera, final OnCaptureCallback callback)