Ejemplo n.º 1
0
 private static String buildImagePath(Image image, int width) {
   if (image.isHatchetImage()) {
     int imageSize = Math.min(image.getHeight(), image.getWidth());
     int actualWidth;
     if (NetworkUtils.isWifiAvailable()) {
       actualWidth = Math.min(imageSize, width);
     } else {
       actualWidth = Math.min(imageSize, width * 2 / 3);
     }
     return image.getImagePath() + "?width=" + actualWidth + "&height=" + actualWidth;
   }
   return image.getImagePath();
 }