docs: private static void choosePreviewSize(Camera.Parameters parms, int width, int height) {
          // We should make sure that the requested MPEG size is less than the preferred
          // size, and has the same aspect ratio.
          Camera.Size ppsfv = parms.getPreferredPreviewSizeForVideo();
          if (ppsfv != null && VERBOSE) {
              Log.d(TAG, "Camera preferred preview size for video is " +
                      ppsfv.width + "x" + ppsfv.height);
          }
  
          for (Camera.Size size : parms.getSupportedPreviewSizes()) {
              if (size.width == width && size.height == height) {
                  parms.setPreviewSize(width, height);
                  return;
              }
          }
  
          Log.w(TAG, "Unable to set preview size to " + width + "x" + height);
          if (ppsfv != null) {
              parms.setPreviewSize(ppsfv.width, ppsfv.height);
          }
          // else use whatever the default size is
      }