Skip to content

Commit

Permalink
Merged google#129
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanf committed Apr 19, 2017
1 parent 8639186 commit 92f5fe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ void takePictureInternal() {
public void onPictureTaken(byte[] data, Camera camera) {
isPictureCaptureInProgress.set(false);
mCallback.onPictureTaken(data);
if (!isCameraOpened()) return;
camera.cancelAutoFocus();
camera.startPreview();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ public void onCaptureCompleted(@NonNull CameraCaptureSession session,
* capturing a still picture.
*/
void unlockFocus() {
if (!isCameraOpened()) return;
mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER,
CaptureRequest.CONTROL_AF_TRIGGER_CANCEL);
try {
Expand Down

0 comments on commit 92f5fe4

Please sign in to comment.