private void containerSized(Size containerSize) {
        this.containerSize = containerSize;
        if (cameraInstance != null) {
            if (cameraInstance.getDisplayConfiguration() == null) {
                displayConfiguration = new DisplayConfiguration(getDisplayRotation(), containerSize);
                displayConfiguration.setPreviewScalingStrategy(getPreviewScalingStrategy());
                cameraInstance.setDisplayConfiguration(displayConfiguration);
                cameraInstance.configureCamera();
                if (torchOn) {
                    cameraInstance.setTorch(torchOn);
                }
            }
        }
    }
Changes the settings for Camera.
Must be called after {@link #resume()}.

@param callback {@link CameraParametersCallback}
zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java