private void focus() {
        if (useAutoFocus) {
            if (!stopped && !focusing) {
                try {
                    camera.autoFocus(autoFocusCallback);
                    focusing = true;
                } catch (RuntimeException re) {
                    // Have heard RuntimeException reported in Android 4.0.x+; continue?
                    Log.w(TAG, "Unexpected exception while focusing", re);
                    // Try again later to keep cycle going
                    autoFocusAgainLater();
                }
            }
        }
    }
Start auto-focus. The first focus will happen now, then repeated every two seconds.
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/AutoFocusManager.java