cameraview icon indicating copy to clipboard operation
cameraview copied to clipboard

set flash on and take a photo ,then auto focus can not work

Open ryetal opened this issue 7 years ago • 0 comments
trafficstars

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

ryetal avatar Feb 06 '18 08:02 ryetal