@Override
        protected void onPostExecute(Drawable result) {
            if (result == null) {
                Log.w(HtmlTextView.TAG, "Drawable result is null! (source: " + source + ")");
                return;
            }
            final UrlDrawable urlDrawable = drawableReference.get();
            if (urlDrawable == null) {
                return;
            }
            // set the correct bound according to the result from HTTP call
            urlDrawable.setBounds(0, 0, (int) (result.getIntrinsicWidth() * scale), (int) (result.getIntrinsicHeight() * scale));

            // change the reference of the current drawable to the result from the HTTP call
            urlDrawable.drawable = result;

            final HtmlHttpImageGetter imageGetter = imageGetterReference.get();
            if (imageGetter == null) {
                return;
            }
            // redraw the image by invalidating the container
            imageGetter.container.invalidate();
            // re-set text to fix images overlapping text
            imageGetter.container.setText(imageGetter.container.getText());
        }
Static inner {@link AsyncTask} that keeps a {@link WeakReference} to the {@link UrlDrawable}
and {@link HtmlHttpImageGetter}.
<p/>
This way, if the AsyncTask has a longer life span than the UrlDrawable,
we won't leak the UrlDrawable or the HtmlRemoteImageGetter.
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/html/HtmlHttpImageGetter.java