package com.tencent.mm.plugin.product.ui;

import android.graphics.drawable.Drawable;
import android.text.Html.ImageGetter;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.ytcommon.BuildConfig;
import java.net.URL;

class HtmlTextView$2 implements ImageGetter {
    final /* synthetic */ HtmlTextView pig;

    HtmlTextView$2(HtmlTextView htmlTextView) {
        this.pig = htmlTextView;
    }

    public final Drawable getDrawable(String str) {
        AppMethodBeat.i(44012);
        try {
            Drawable createFromStream = Drawable.createFromStream(new URL(str).openStream(), BuildConfig.FLAVOR);
            if (createFromStream != null) {
                createFromStream.setBounds(0, 0, createFromStream.getIntrinsicWidth(), createFromStream.getIntrinsicHeight());
            }
            AppMethodBeat.o(44012);
            return createFromStream;
        } catch (Exception e) {
            AppMethodBeat.o(44012);
            return null;
        }
    }
}
