public static CameraThread getInstance() {
        if (instance == null) {
            instance = new CameraThread();
        }
        return instance;
    }
Singleton thread that is started and stopped on demand.

Any access to Camera / CameraManager should happen on this thread, through CameraInstance.
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/CameraThread.java