s6 and use camera1. when I turn on flash and take a photo ,then auto focus can not restore . I modify Camera1.java :
void takePictureInternal() {
if (!isPictureCaptureInProgress.getAndSet(true)) {
mCamera.takePicture(null, null, null, new Camera.PictureCallback() {
@Override
public void onPictureTaken(byte[] data, Camera camera) {
isPictureCaptureInProgress.set(false);
mCallback.onPictureTaken(data);
camera.cancelAutoFocus();
camera.startPreview();
mCamera.setParameters(mCameraParameters); //add this line and work well,but I dont know why?
}
});
}
s6 and use camera1. when I turn on flash and take a photo ,then auto focus can not restore . I modify Camera1.java : void takePictureInternal() { if (!isPictureCaptureInProgress.getAndSet(true)) { mCamera.takePicture(null, null, null, new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { isPictureCaptureInProgress.set(false); mCallback.onPictureTaken(data); camera.cancelAutoFocus(); camera.startPreview();