package com.tencent.mm.plugin.appbrand.jsapi.m;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.r.m;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.al;
import com.tencent.mm.sdk.platformtools.bo;
import org.json.JSONArray;
import org.json.JSONObject;

final class i extends d {
    i() {
    }

    static /* synthetic */ void a(i iVar) {
        AppMethodBeat.i(126365);
        super.aEL();
        AppMethodBeat.o(126365);
    }

    /* Access modifiers changed, original: final */
    public final void C(JSONObject jSONObject) {
        AppMethodBeat.i(126364);
        JSONArray optJSONArray = jSONObject.optJSONArray("array");
        int optInt = jSONObject.optInt("current", 0);
        if (optJSONArray == null || optJSONArray.length() <= 0) {
            ab.i("MicroMsg.AppBrand.JsApi.OptionsPickerHandler", "showPickerView as selector, empty range");
            l("ok", null);
            m.runOnUiThread(new 1(this));
            AppMethodBeat.o(126364);
            return;
        }
        String[] strArr = new String[optJSONArray.length()];
        int i = 0;
        while (i < optJSONArray.length()) {
            try {
                strArr[i] = optJSONArray.getString(i);
                i++;
            } catch (Exception e) {
                ab.e("MicroMsg.AppBrand.JsApi.OptionsPickerHandler", "opt data.array, exp = %s", new Object[]{bo.l(e)});
                l("fail", null);
                AppMethodBeat.o(126364);
                return;
            }
        }
        al.d(new 2(this, strArr, optInt));
        AppMethodBeat.o(126364);
    }
}
