导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - C0433d.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 C0433d.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package qs;

import ah0.a;
import android.net.Network;
import android.net.Uri;
import android.text.TextUtils;
import com.google.android.inner_exoplayer2.analytics.AnalyticsListener;
import com.google.android.inner_exoplayer2.text.ttml.TtmlNode;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.sdk.plus.BuildConstants;
import com.sdk.plus.data.manager.RalDataManager;
import com.wifitutu.link.foundation.kernel.m;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoAuthFailReasonEvent;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoAuthFatApUrlEvent;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoAuthFatApUrlSucEvent;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoAuthPreEvent;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoAuthShortPassEvent;
import com.wifitutu.wifi.monitor.api.generate.sco.BdScoCommonParams;
import java.util.Set;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.f0;
import kotlin.jvm.internal.n;
import kotlin.jvm.internal.p;
import lg0.C0434a;
import lg0.e0;
import org.json.JSONObject;
import os.f2;
import os.g1;
import qs.h4;
import tj0.t;
import uu.f1;
import uu.h2;
import uu.k;
import uu.t2;
import uu.v0;
import uu.w0;
import uu.x2;
import wu.d;

@Metadata(d1 = {"\u0000X\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b'\u0018\u0000 %2\u00020\u0001:\u0001\u0016B?\u0012\n\b\u0002\u0010\u0003\u001a\u0004\u0018\u00010\u0002\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0004\u0012\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u0006\u0012\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\b\u0012\u0006\u0010\u000b\u001a\u00020\n¢\u0006\u0004\b\f\u0010\rJ\u0015\u0010\u000e\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\n¢\u0006\u0004\b\u000e\u0010\u000fJ\u0019\u0010\u0012\u001a\u0004\u0018\u00010\u00112\b\u0010\u0010\u001a\u0004\u0018\u00010\u0004¢\u0006\u0004\b\u0012\u0010\u0013J\u0015\u0010\u0016\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u0014¢\u0006\u0004\b\u0016\u0010\u0017J\u000f\u0010\u0018\u001a\u0004\u0018\u00010\u0011¢\u0006\u0004\b\u0018\u0010\u0019J\u0017\u0010\u001c\u001a\u00020\u001b2\b\u0010\u001a\u001a\u0004\u0018\u00010\u0004¢\u0006\u0004\b\u001c\u0010\u001dJ\u001d\u0010!\u001a\u00020 2\u0006\u0010\u001e\u001a\u00020\u00042\u0006\u0010\u001f\u001a\u00020\u001b¢\u0006\u0004\b!\u0010\"J\u0015\u0010%\u001a\u00020 2\u0006\u0010$\u001a\u00020#¢\u0006\u0004\b%\u0010&J\u0019\u0010(\u001a\u00020\u00022\b\u0010'\u001a\u0004\u0018\u00010\u0004H\u0002¢\u0006\u0004\b(\u0010)J+\u0010.\u001a\u00020 2\b\u0010+\u001a\u0004\u0018\u00010*2\u0006\u0010,\u001a\u00020\u00042\b\u0010-\u001a\u0004\u0018\u00010\u0001H\u0002¢\u0006\u0004\b.\u0010/J\u0011\u00100\u001a\u0004\u0018\u00010\u0011H\u0002¢\u0006\u0004\b0\u0010\u0019J\u0017\u00102\u001a\u00020 2\u0006\u00101\u001a\u00020\u001bH\u0002¢\u0006\u0004\b2\u00103J!\u00106\u001a\u00020 2\u0006\u00104\u001a\u00020\u00022\b\u00105\u001a\u0004\u0018\u00010\u0011H\u0002¢\u0006\u0004\b6\u00107R\u0016\u0010\u0003\u001a\u0004\u0018\u00010\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0016\u00108R\u0016\u0010\u0005\u001a\u0004\u0018\u00010\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b0\u00109R\u0016\u0010\u0007\u001a\u0004\u0018\u00010\u00068\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b:\u0010;R\u0016\u0010\t\u001a\u0004\u0018\u00010\b8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b<\u0010=R\u0014\u0010\u000b\u001a\u00020\n8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b>\u0010?R$\u0010D\u001a\u0004\u0018\u00010\u00048\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b@\u00109\u001a\u0004\b:\u0010A\"\u0004\bB\u0010CR(\u0010G\u001a\u0004\u0018\u00010\u00042\b\u0010E\u001a\u0004\u0018\u00010\u00048\u0006@BX\u0086\u000e¢\u0006\f\n\u0004\b\u0012\u00109\u001a\u0004\bF\u0010AR(\u0010H\u001a\u0004\u0018\u00010\u00042\b\u0010E\u001a\u0004\u0018\u00010\u00048\u0006@BX\u0086\u000e¢\u0006\f\n\u0004\b\u001c\u00109\u001a\u0004\b<\u0010AR\u0018\u0010\u001e\u001a\u0004\u0018\u00010\u00048\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b.\u00109R(\u0010J\u001a\u0004\u0018\u00010\u00112\b\u0010E\u001a\u0004\u0018\u00010\u00118\u0006@BX\u0086\u000e¢\u0006\f\n\u0004\b6\u0010I\u001a\u0004\b>\u0010\u0019R\u0016\u0010L\u001a\u00020\u001b8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b!\u0010KR$\u0010'\u001a\u0004\u0018\u00010\u00048\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b2\u00109\u001a\u0004\bM\u0010A\"\u0004\bN\u0010CR\u0013\u0010P\u001a\u0004\u0018\u00010*8F¢\u0006\u0006\u001a\u0004\b@\u0010O¨\u0006Q"}, d2 = {"Lgs/d;", "", "", RalDataManager.DB_TYPE, "", "uuid", "Lcom/wifitutu/link/foundation/kernel/m;", "wifiId", "Landroid/net/Network;", "network", "Luu/h2;", "param", "<init>", "(Ljava/lang/Integer;Ljava/lang/String;Lcom/wifitutu/link/foundation/kernel/m;Landroid/net/Network;Luu/h2;)V", "n", "(Luu/h2;)I", "url", "Lhs/a;", "g", "(Ljava/lang/String;)Lhs/a;", "Landroid/net/Uri$Builder;", "builder", "a", "(Landroid/net/Uri$Builder;)Landroid/net/Uri$Builder;", TtmlNode.TAG_P, "()Lhs/a;", "result", "", "h", "(Ljava/lang/String;)Z", "fatApUrl", "tempPass", "Llg0/e0;", "k", "(Ljava/lang/String;Z)V", "Lcom/wifitutu/wifi/monitor/api/generate/sco/BdScoCommonParams;", "event", "m", "(Lcom/wifitutu/wifi/monitor/api/generate/sco/BdScoCommonParams;)V", "redirectUrl", "o", "(Ljava/lang/String;)I", "Lorg/json/JSONObject;", "json", RalDataManager.DB_KEY, RalDataManager.DB_VALUE, mk.i.x, "(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/Object;)V", "b", "hzAp", "l", "(Z)V", "code", "res", "j", "(ILhs/a;)V", "Ljava/lang/Integer;", "Ljava/lang/String;", "c", "Lcom/wifitutu/link/foundation/kernel/m;", "d", "Landroid/net/Network;", "e", "Luu/h2;", "f", "()Ljava/lang/String;", "setMac", "(Ljava/lang/String;)V", "mac", "<set-?>", "getPortalType", "portalType", "portalVendor", "Lhs/a;", "shortPassProtoRes", "Z", "canceled", "getRedirectUrl", "setRedirectUrl", "()Lorg/json/JSONObject;", "shortPassResult", "feature-wifi-sco_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class C0433d {
    public static ChangeQuickRedirect changeQuickRedirect;

    public final Integer type;

    public final String uuid;

    public final m wifiId;

    public final Network network;

    public final h2 param;

    public String mac;

    public String portalType;

    public String portalVendor;

    public String fatApUrl;

    public C0434a shortPassProtoRes;

    public boolean canceled;

    public String redirectUrl;

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class b extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<C0434a> s;

        public b(f0<C0434a> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6677, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            StringBuilder sb = new StringBuilder();
            sb.append("嗅探响应数据:");
            C0434a c0434a = (C0434a) this.s.a;
            sb.append(c0434a != null ? Integer.valueOf(c0434a.getStatusCode()) : null);
            sb.append(", ");
            C0434a c0434a2 = (C0434a) this.s.a;
            sb.append(c0434a2 != null ? c0434a2.getContent() : null);
            return sb.toString();
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class c extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final String s;

        public c(String str) {
            super(0);
            this.s = str;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6678, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "嗅探响应 checkUrl:" + this.s;
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class C0184d extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<C0434a> s;

        public C0184d(f0<C0434a> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6679, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "二次探测响应数据:" + this.s.a;
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class e extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public e() {
            super(0);
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6680, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "二次探测响应 shortPassProtoRes:" + C0433d.this.getShortPassProtoRes();
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class f extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<String> s;

        public f(f0<String> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6681, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "嗅探响应 redirect:" + ((String) this.s.a);
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class g extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<String> s;

        public g(f0<String> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6682, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "嗅探 高铁WiFi url没有参数  执行redirect:" + ((String) this.s.a);
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class h extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<String> s;

        public h(f0<String> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6683, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "嗅探 高铁WiFi 获取到新url  执行redirect:" + ((String) this.s.a);
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class i extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public i() {
            super(0);
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6684, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "临时放行响应数据:" + C0433d.this.getShortPassProtoRes();
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class j extends p implements a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final f0<d> s;

        public j(f0<d> f0Var) {
            super(0);
            this.s = f0Var;
        }

        public final Object invoke() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6685, new Class[0], Object.class);
            if (proxy.isSupported) {
                return proxy.result;
            }
            return "发起http探测 response=" + this.s.a;
        }
    }

    public C0433d(Integer num, String str, m mVar, Network network, h2 h2Var) {
        this.type = num;
        this.uuid = str;
        this.wifiId = mVar;
        this.network = network;
        this.param = h2Var;
    }

    public final Uri.Builder a(Uri.Builder builder) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{builder}, this, changeQuickRedirect, false, 6670, new Class[]{Uri.Builder.class}, Uri.Builder.class);
        if (proxy.isSupported) {
            return (Uri.Builder) proxy.result;
        }
        builder.appendQueryParameter("mode", "wk");
        builder.appendQueryParameter("uuid", this.uuid);
        builder.appendQueryParameter(RalDataManager.DB_TYPE, String.valueOf(this.type));
        return builder;
    }

    public final C0434a b() {
        C0434a g2;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6668, new Class[0], C0434a.class);
        if (proxy.isSupported) {
            return (C0434a) proxy.result;
        }
        int i2 = 0;
        do {
            if (i2 > 0) {
                try {
                    Thread.sleep((long) (BuildConstants.TYPE_STEP * Math.pow(2.0d, i2)));
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
            g2 = g("http://alps.51y5.net/alps/sco/checknet.do");
            i2++;
            if (i2 >= 3) {
                break;
            }
        } while (!C0434a.INSTANCE.h(g2));
        BdScoAuthShortPassEvent bdScoAuthShortPassEvent = new BdScoAuthShortPassEvent();
        bdScoAuthShortPassEvent.k(Boolean.valueOf(C0434a.INSTANCE.h(g2)));
        bdScoAuthShortPassEvent.l(this.portalVendor);
        m(bdScoAuthShortPassEvent);
        return g2;
    }

    public final String getMac() {
        return this.mac;
    }

    public final String getPortalVendor() {
        return this.portalVendor;
    }

    public final C0434a getShortPassProtoRes() {
        return this.shortPassProtoRes;
    }

    public final JSONObject f() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6666, new Class[0], JSONObject.class);
        if (proxy.isSupported) {
            return (JSONObject) proxy.result;
        }
        if (this.shortPassProtoRes == null) {
            return null;
        }
        JSONObject jSONObject = new JSONObject();
        C0434a c0434a = this.shortPassProtoRes;
        n.f(c0434a);
        i(jSONObject, "code", Integer.valueOf(c0434a.getStatusCode()));
        C0434a c0434a2 = this.shortPassProtoRes;
        n.f(c0434a2);
        i(jSONObject, "content", c0434a2.getContent());
        i(jSONObject, "redirectUrl", this.redirectUrl);
        i(jSONObject, "mac", this.mac);
        i(jSONObject, "portalType", this.portalType);
        i(jSONObject, "portalVendor", this.portalVendor);
        i(jSONObject, "fatApUrl", this.fatApUrl);
        i(jSONObject, RalDataManager.DB_TYPE, this.type);
        i(jSONObject, "uuid", this.uuid);
        return jSONObject;
    }

    public final C0434a g(String url) {
        d o;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{url}, this, changeQuickRedirect, false, 6669, new Class[]{String.class}, C0434a.class);
        if (proxy.isSupported) {
            return (C0434a) proxy.result;
        }
        if (TextUtils.isEmpty(url)) {
            return null;
        }
        String uri = a(Uri.parse(url).buildUpon()).build().toString();
        int i2 = 0;
        while (true) {
            if (i2 > 0) {
                try {
                    Thread.sleep((long) (BuildConstants.TYPE_STEP * Math.pow(2.0d, i2)));
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
            o = wu.b.o(uri, wu.b.c(this.network));
            i2++;
            if (i2 >= 3 || (o != null && o.b() >= 10)) {
                break;
            }
        }
        return C0434a.INSTANCE.a(o);
    }

    public final boolean h(String result) {
        JSONObject b2;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{result}, this, changeQuickRedirect, false, 6672, new Class[]{String.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (result == null || result.length() == 0 || (b2 = zs.a.b(result)) == null) {
            return false;
        }
        int optInt = b2.optInt("code");
        String optString = b2.optString("content");
        this.mac = b2.optString("mac");
        this.portalType = b2.optString("portalType");
        this.portalVendor = b2.optString("portalVendor");
        this.fatApUrl = b2.optString("fatApUrl");
        this.shortPassProtoRes = new C0434a(optInt, optString);
        return true;
    }

    public final void i(JSONObject json, String key, Object value) {
        if (PatchProxy.proxy(new Object[]{json, key, value}, this, changeQuickRedirect, false, 6667, new Class[]{JSONObject.class, String.class, Object.class}, Void.TYPE).isSupported || json == null) {
            return;
        }
        try {
            json.putOpt(key, value);
        } catch (Exception unused) {
        }
    }

    public final void j(int code, C0434a res) {
        if (PatchProxy.proxy(new Object[]{new Integer(code), res}, this, changeQuickRedirect, false, 6674, new Class[]{Integer.TYPE, C0434a.class}, Void.TYPE).isSupported) {
            return;
        }
        BdScoAuthFailReasonEvent bdScoAuthFailReasonEvent = new BdScoAuthFailReasonEvent();
        bdScoAuthFailReasonEvent.m(String.valueOf(code));
        bdScoAuthFailReasonEvent.k(String.valueOf(res != null ? Integer.valueOf(res.getStatusCode()) : null));
        bdScoAuthFailReasonEvent.l(res != null ? res.getContent() : null);
        m(bdScoAuthFailReasonEvent);
    }

    public final void k(String fatApUrl, boolean tempPass) {
        if (PatchProxy.proxy(new Object[]{fatApUrl, new Byte(tempPass ? (byte) 1 : (byte) 0)}, this, changeQuickRedirect, false, 6675, new Class[]{String.class, Boolean.TYPE}, Void.TYPE).isSupported) {
            return;
        }
        BdScoAuthFatApUrlEvent bdScoAuthFatApUrlEvent = new BdScoAuthFatApUrlEvent();
        bdScoAuthFatApUrlEvent.k(this.portalVendor);
        bdScoAuthFatApUrlEvent.l(tempPass ? "Y" : "N");
        m(bdScoAuthFatApUrlEvent);
        C0434a g2 = g(fatApUrl);
        BdScoAuthFatApUrlSucEvent bdScoAuthFatApUrlSucEvent = new BdScoAuthFatApUrlSucEvent();
        bdScoAuthFatApUrlSucEvent.m(this.portalVendor);
        C0434a.Companion companion = C0434a.INSTANCE;
        bdScoAuthFatApUrlSucEvent.l(Boolean.valueOf(n.d(companion.i(g2, companion.b()), "100")));
        bdScoAuthFatApUrlSucEvent.k(companion.i(g2, companion.f()));
        bdScoAuthFatApUrlSucEvent.n(tempPass ? "Y" : "N");
        m(bdScoAuthFatApUrlSucEvent);
    }

    public final void l(boolean hzAp) {
        if (PatchProxy.proxy(new Object[]{new Byte(hzAp ? (byte) 1 : (byte) 0)}, this, changeQuickRedirect, false, 6673, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            return;
        }
        BdScoAuthPreEvent bdScoAuthPreEvent = new BdScoAuthPreEvent();
        bdScoAuthPreEvent.k(Boolean.valueOf(hzAp));
        bdScoAuthPreEvent.l(this.portalVendor);
        m(bdScoAuthPreEvent);
    }

    public final void m(BdScoCommonParams event) {
        f1 a;
        if (PatchProxy.proxy(new Object[]{event}, this, changeQuickRedirect, false, 6676, new Class[]{BdScoCommonParams.class}, Void.TYPE).isSupported || (a = qu.h.a()) == null) {
            return;
        }
        t2 t2Var = new t2((m) null, (String) null, (Long) null, (x2) null, (k) null, (String) null, (Integer) null, (String) null, (Integer) null, false, AnalyticsListener.EVENT_DRM_KEYS_LOADED, (DefaultConstructorMarker) null);
        t2Var.t(this.param.r());
        t2Var.k(this.param.b());
        t2Var.l(Integer.valueOf(this.param.c()));
        t2Var.s(this.param.o());
        event.e(this.mac);
        e0 e0Var = e0.a;
        a.Q2(t2Var, event);
    }

    public final int n(h2 param) {
        Set<String> queryParameterNames;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{param}, this, changeQuickRedirect, false, 6664, new Class[]{h2.class}, Integer.TYPE);
        if (proxy.isSupported) {
            return ((Integer) proxy.result).intValue();
        }
        f0 f0Var = new f0();
        f0 f0Var2 = new f0();
        f0Var2.a = p();
        h4.l().y("WIFI_AUTH|connect", new b(f0Var2));
        C0434a.Companion companion = C0434a.INSTANCE;
        if (companion.h((C0434a) f0Var2.a)) {
            Object obj = f0Var2.a;
            n.f(obj);
            String a = is.a.a(((C0434a) obj).getContent());
            h4.l().y("WIFI_AUTH|connect", new c(a));
            if (TextUtils.isEmpty(a)) {
                j(21, (C0434a) f0Var2.a);
                return 21;
            }
            f0Var2.a = g(a);
            h4.l().y("WIFI_AUTH|connect", new C0184d(f0Var2));
            if (companion.h((C0434a) f0Var2.a)) {
                this.shortPassProtoRes = (C0434a) f0Var2.a;
                h4.l().y("WIFI_AUTH|connect", new e());
                return o(a);
            }
        }
        if (companion.g((C0434a) f0Var2.a)) {
            Object obj2 = f0Var2.a;
            n.f(obj2);
            f0Var.a = ((C0434a) obj2).getContent();
        }
        h4.l().y("WIFI_AUTH|connect", new f(f0Var));
        if (TextUtils.isEmpty((CharSequence) f0Var.a)) {
            j(20, (C0434a) f0Var2.a);
            return 20;
        }
        if (this.canceled) {
            j(10, (C0434a) f0Var2.a);
            return 10;
        }
        String str = (String) f0Var.a;
        if (str != null) {
            v0 b2 = w0.b(g1.a(f2.d()));
            m r = param.r();
            if ((b2.y0(r != null ? r.b() : null) || param.s() == 1) && ((queryParameterNames = Uri.parse(t.F(str, "#", "%23", false, 4, (Object) null)).getQueryParameterNames()) == null || queryParameterNames.isEmpty())) {
                h4.l().y("WIFI_AUTH|connect", new g(f0Var));
                C0434a g2 = g((String) f0Var.a);
                f0Var.a = g2 != null ? g2.getContent() : null;
                h4.l().y("WIFI_AUTH|connect", new h(f0Var));
            }
        }
        this.shortPassProtoRes = g((String) f0Var.a);
        this.redirectUrl = (String) f0Var.a;
        h4.l().y("WIFI_AUTH|connect", new i());
        return o((String) f0Var.a);
    }

    public final int o(String redirectUrl) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{redirectUrl}, this, changeQuickRedirect, false, 6665, new Class[]{String.class}, Integer.TYPE);
        if (proxy.isSupported) {
            return ((Integer) proxy.result).intValue();
        }
        C0434a.Companion companion = C0434a.INSTANCE;
        if (companion.g(this.shortPassProtoRes)) {
            Uri parse = Uri.parse(redirectUrl);
            this.mac = parse.getQueryParameter("client_mac");
            this.portalType = parse.getQueryParameter(companion.c());
            this.portalVendor = parse.getQueryParameter(companion.d());
        } else {
            if (!companion.h(this.shortPassProtoRes)) {
                l(false);
                j(31, this.shortPassProtoRes);
                return 31;
            }
            C0434a c0434a = this.shortPassProtoRes;
            n.f(c0434a);
            this.mac = c0434a.h("client_mac");
            C0434a c0434a2 = this.shortPassProtoRes;
            n.f(c0434a2);
            this.portalType = c0434a2.h(companion.c());
            C0434a c0434a3 = this.shortPassProtoRes;
            n.f(c0434a3);
            this.portalVendor = c0434a3.h(companion.d());
            C0434a c0434a4 = this.shortPassProtoRes;
            n.f(c0434a4);
            this.fatApUrl = c0434a4.h(companion.e());
            C0434a c0434a5 = this.shortPassProtoRes;
            n.f(c0434a5);
            if (!TextUtils.equals("0", c0434a5.h(companion.b()))) {
                l(false);
                j(31, this.shortPassProtoRes);
                return 31;
            }
        }
        if (TextUtils.isEmpty(this.portalVendor) || TextUtils.isEmpty(this.portalType)) {
            l(false);
            j(30, this.shortPassProtoRes);
            return 30;
        }
        if (!TextUtils.isEmpty(this.fatApUrl)) {
            String str = this.fatApUrl;
            n.f(str);
            k(str, true);
        }
        l(true);
        if (companion.h(b())) {
            return 0;
        }
        j(32, this.shortPassProtoRes);
        return 32;
    }

    public final C0434a p() {
        Object obj;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6671, new Class[0], C0434a.class);
        if (proxy.isSupported) {
            return (C0434a) proxy.result;
        }
        f0 f0Var = new f0();
        int i2 = 0;
        while (true) {
            if (i2 > 0) {
                try {
                    Thread.sleep((long) (BuildConstants.TYPE_STEP * Math.pow(2.0d, i2)));
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
            f0Var.a = wu.b.o("http://check02.51y5.net/cp.a?time=" + System.currentTimeMillis(), wu.b.c(this.network));
            h4.l().y("WIFI_AUTH|connect", new j(f0Var));
            i2++;
            if (i2 >= 3 || ((obj = f0Var.a) != null && ((d) obj).b() >= 10)) {
                break;
            }
        }
        return C0434a.INSTANCE.a((d) f0Var.a);
    }
}