public void close() {
        if (camera != null) {
            camera.release();
            camera = null;
        }
    }
Closes the camera driver if still in use.

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