docs: protected Bitmap downloadBitmap(String url, BitmapOptions options) throws Exception {
      AndroidHttpClient client = AndroidHttpClient.newInstance("Android");
      HttpGet getRequest = new HttpGet(url);
  
      try {
        HttpResponse response = client.execute(getRequest);
        int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode != HttpStatus.SC_OK) {
          // we could check the status, but we'll just assume that if there's a Location header,
          // we should follow it
          Header[] headers = response.getHeaders("Location");
          if (headers != null && headers.length > 0) {
            return downloadBitmap(headers[headers.length-1].getValue(), options);
          }
          throw new Exception("Error " + statusCode + " while retrieving bitmap from " + url);
        }
  
        HttpEntity entity = response.getEntity();
        if (entity == null)
          throw new Exception("Error: getEntity returned null for " + url);
  
        InputStream inputStream = null;
        try {
          inputStream = entity.getContent();
          return BitmapFactory.decodeStream(inputStream, null, options);
        } finally {
          if (inputStream != null)
            inputStream.close();
          entity.consumeContent();
        }
  
      } catch (Exception e) {
        // Could provide a more explicit error message for IOException or IllegalStateException
        getRequest.abort();
        plat.reportError("Error while retrieving bitmap from " + url, e);
        throw e;
  
      } finally {
        client.close();
      }
    }