Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ private void runPrecaptureSequence() {
captureSession.capture(
previewRequestBuilder.build(), cameraCaptureCallback, backgroundHandler);

// Reset the trigger to idle again.
previewRequestBuilder.set(
CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,
CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_IDLE);

} catch (CameraAccessException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -796,6 +801,9 @@ private void lockAutoFocus() {
: e.getMessage();
dartMessenger.sendCameraErrorEvent(message);
}
// Reset the trigger to idle again.
previewRequestBuilder.set(
CaptureRequest.CONTROL_AF_TRIGGER, CaptureRequest.CONTROL_AF_TRIGGER_IDLE);
}

/** Cancel and reset auto focus state and refresh the preview session. */
Expand Down
Loading