public Size getBestPreviewSize(List<Size> sizes, boolean isRotated) {
        // Sample of supported preview sizes:
        // http://www.kirill.org/ar/ar.php


        final Size desired = getDesiredPreviewSize(isRotated);

        return previewScalingStrategy.getBestPreviewSize(sizes, desired);
    }
Choose the best preview size, based on our display size.

We prefer:
1. no scaling
2. least downscaling
3. least upscaling

We do not care much about aspect ratio, since we just crop away extra pixels. We only choose
the size to minimize scaling.

In the future we may consider choosing the biggest possible preview size, to maximize the
resolution we have for decoding. We need more testing to see whether or not that is feasible.

@param sizes supported preview sizes, containing at least one size. Sizes are in natural camera orientation.
@param isRotated true if the camera is rotated perpendicular to the current display orientation
@return the best preview size, never null
zxing-android-embedded/src/com/journeyapps/barcodescanner/camera/DisplayConfiguration.java