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

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.webview.ui.tools.jsapi.d;
import com.tencent.mm.plugin.webview.ui.tools.jsapi.d.35;
import com.tencent.mm.plugin.webview.ui.tools.jsapi.i.a;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.al;
import com.tencent.ytcommon.BuildConfig;
import org.json.JSONException;
import org.json.JSONObject;

class BaseSOSWebViewUI$5 implements Runnable {
    final /* synthetic */ String iIA;
    final /* synthetic */ BaseSOSWebViewUI uAz;

    BaseSOSWebViewUI$5(BaseSOSWebViewUI baseSOSWebViewUI, String str) {
        this.uAz = baseSOSWebViewUI;
        this.iIA = str;
    }

    public final void run() {
        AppMethodBeat.i(8335);
        if (this.uAz.getJsapi() != null) {
            d jsapi = this.uAz.getJsapi();
            String str = this.iIA;
            if (jsapi.ready) {
                ab.i("MicroMsg.JsApiHandler", "onSearchHistoryReady success, ready");
                try {
                    al.d(new 35(jsapi, a.a("onSearchHistoryReady", new JSONObject(str), jsapi.uFv, jsapi.uFw)));
                    AppMethodBeat.o(8335);
                    return;
                } catch (JSONException e) {
                    ab.printErrStackTrace("MicroMsg.JsApiHandler", e, BuildConfig.FLAVOR, new Object[0]);
                }
            } else {
                ab.e("MicroMsg.JsApiHandler", "onSearchHistoryReady fail, not ready");
                AppMethodBeat.o(8335);
                return;
            }
        }
        AppMethodBeat.o(8335);
    }
}
