public void stopPreview() {
        if (autoFocusManager != null) {
            autoFocusManager.stop();
            autoFocusManager = null;
        }
        if (ambientLightManager != null) {
            ambientLightManager.stop();
            ambientLightManager = null;
        }
        if (camera != null && previewing) {
            camera.stopPreview();
            cameraPreviewCallback.setCallback(null);
            previewing = false;
        }
    }
Tells the camera to stop drawing preview frames.

Must be called from camera thread.
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/CameraManager.java