package com.tencent.mm.plugin.webview.ui.tools.jsapi;

import android.os.RemoteException;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;

class d$67 implements Runnable {
    final /* synthetic */ d uFI;
    final /* synthetic */ String uFQ;

    d$67(d dVar, String str) {
        this.uFI = dVar;
        this.uFQ = str;
    }

    public final void run() {
        AppMethodBeat.i(8931);
        String a = d.a(this.uFI, "html");
        if (!d.hl(a, this.uFQ)) {
            ab.e("MicroMsg.JsApiHandler", "failed to write Html file");
        } else if (!(d.n(this.uFI) == null || d.d(this.uFI) == null)) {
            try {
                d.n(this.uFI).J(1, d.d(this.uFI).getUrl(), a);
                AppMethodBeat.o(8931);
                return;
            } catch (RemoteException e) {
                ab.e("MicroMsg.JsApiHandler", "uploadFileToCDN error ", new Object[]{e.getMessage()});
                AppMethodBeat.o(8931);
                return;
            }
        }
        AppMethodBeat.o(8931);
    }
}
