@Override
        public void onAutoFocus(boolean success, Camera theCamera) {
            handler.post(() -> {
                focusing = false;
                autoFocusAgainLater();
            });
        }
This should be created and used from the camera thread only. The thread message queue is used
to run all operations on the same thread.
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/AutoFocusManager.java