package com.tencent.mm.plugin.appbrand.config;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import java.util.List;
import org.json.JSONObject;

public final class WxaAttributes$a {
    public int fmr;
    public long haQ = 0;
    public long haR = 0;
    public int hgD;
    public String hgE;
    public String hhR;
    public int hhS;
    public List<String> hhT;
    public List<String> hhU;
    public List<String> hhV;
    public List<String> hhW;
    public List<String> hhX;
    public String hhY;

    public final boolean xy() {
        return this.fmr == 4;
    }

    public static WxaAttributes$a zx(String str) {
        AppMethodBeat.i(96159);
        if (bo.isNullOrNil(str)) {
            ab.e("MicroMsg.AppBrand.WxaAttributes", "getAppInfo, json is EMPTY");
            AppMethodBeat.o(96159);
            return null;
        }
        WxaAttributes$a wxaAttributes$a;
        try {
            JSONObject jSONObject = new JSONObject(str);
            wxaAttributes$a = new WxaAttributes$a();
            JSONObject optJSONObject = jSONObject.optJSONObject("RunningFlagInfo");
            if (optJSONObject != null) {
                wxaAttributes$a.haQ = optJSONObject.optLong("RunningFlag");
                wxaAttributes$a.hhR = optJSONObject.optString("AppOpenForbiddenUrl");
                wxaAttributes$a.haR = optJSONObject.optLong("CanNotStarWxaBeforeTime", 0);
            }
            optJSONObject = jSONObject.optJSONObject("Network");
            if (optJSONObject != null) {
                wxaAttributes$a.hhT = t.l(optJSONObject.optJSONArray("RequestDomain"));
                wxaAttributes$a.hhU = t.l(optJSONObject.optJSONArray("WsRequestDomain"));
                wxaAttributes$a.hhV = t.l(optJSONObject.optJSONArray("UploadDomain"));
                wxaAttributes$a.hhW = t.l(optJSONObject.optJSONArray("DownloadDomain"));
                wxaAttributes$a.hhX = t.l(optJSONObject.optJSONArray("UDPDomain"));
            }
            wxaAttributes$a.hhS = jSONObject.optInt("WechatPluginApp", 0);
            wxaAttributes$a.fmr = jSONObject.optInt("AppServiceType", 0);
            wxaAttributes$a.hhY = jSONObject.optString("fromBusinessUsername");
            wxaAttributes$a.hgD = jSONObject.optInt("OriginalFlag", 0);
            wxaAttributes$a.hgE = jSONObject.optString("OriginalRedirectUrl");
        } catch (Exception e) {
            ab.e("MicroMsg.AppBrand.WxaAttributes", "getAppInfo, json(%s) parse failed ex = %s", new Object[]{str, e});
            wxaAttributes$a = null;
        }
        AppMethodBeat.o(96159);
        return wxaAttributes$a;
    }
}
