public void setPreviewDisplay(SurfaceHolder holder) throws IOException {
        setPreviewDisplay(new CameraSurface(holder));
    }
Must be called from camera thread.
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/CameraManager.java