@Override
                    protected void onNewResultImpl(DataSource<CloseableReference<CloseableImage>> dataSource) {
                        if (!dataSource.isFinished()) {
                            return;
                        }
                        // If the listener isn't still valid, then return before we fetch the result
                        // and the memory-intensive bitmap.
                        if (listener != null && !listener.isValid()) {
                            return;
                        }
                        // If we need to keep track and close any CloseableReferences, but NOT the
                        // data contained within.
                        CloseableReference<CloseableImage> result = dataSource.getResult();
                        CloseableImage image = result.get();
                        Log.d("[ImageDownloader.onNewResultImpl]", image.getClass().toString());
                        if (image instanceof BaseCloseableStaticBitmap) {
                            Bitmap bitmap = ((BaseCloseableStaticBitmap) image).getUnderlyingBitmap();

                            if (listener != null) {
                                listener.completed(bitmap.copy(mConfig, true));
                            } else {
                                Bitmap temp = bitmap.copy(mConfig, true);
                                if (temp != null) {
                                    mImageMap.put(latch, temp);
                                }
                            }
                        }

                        result.close();
                        dataSource.close();
                        if (latch != null) {
                            latch.countDown();
                        }
                    }
This method fetches an image asynchrously

@param map a ReadableMap with a "uri" key, ideally the same one we get from the JS layer
@param listener object that will be called once the image is fetched.
android/viro_bridge/src/main/java/com/viromedia/bridge/utility/ImageDownloader.java