导航菜单

页面标题

页面副标题

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

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

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


package gs;

import android.net.Network;
import android.net.Uri;
import android.text.TextUtils;
import com.facebook.react.uimanager.events.o;
import com.google.android.inner_exoplayer2.analytics.AnalyticsListener;
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 com.zm.adxsdk.protocol.api.interfaces.WfConstant;
import com.zm.fda.Z2500.ZZ00Z;
import hs.a;
import java.util.Set;
import kotlin.Metadata;
import kotlin.jvm.internal.f0;
import kotlin.jvm.internal.n;
import kotlin.jvm.internal.p;
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.t2;
import uu.v0;
import uu.w0;

@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;", "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.f16820f, "(Ljava/lang/String;)I", "Lorg/json/JSONObject;", "json", RalDataManager.DB_KEY, RalDataManager.DB_VALUE, mk.i.f59902x, "(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/Object;)V", bg.b.f9417c, "hzAp", "l", "(Z)V", WfConstant.EVENT_KEY_FAIL_CODE, "res", "j", "(ILhs/a;)V", "Ljava/lang/Integer;", "Ljava/lang/String;", r0.c.f68529d, "Lcom/wifitutu/link/foundation/kernel/m;", bg.d.f9423d, "Landroid/net/Network;", "e", "Luu/h2;", "f", "()Ljava/lang/String;", "setMac", "(Ljava/lang/String;)V", ZZ00Z.A, "<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 d {
    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 hs.a 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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<hs.a> f48754s;

        public b(f0<hs.a> f0Var) {
            super(0);
            this.f48754s = f0Var;
        }

        @Override
        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 sb2 = new StringBuilder();
            sb2.append("嗅探响应数据:");
            hs.a aVar = this.f48754s.f57653a;
            sb2.append(aVar != null ? Integer.valueOf(aVar.getStatusCode()) : null);
            sb2.append(", ");
            hs.a aVar2 = this.f48754s.f57653a;
            sb2.append(aVar2 != null ? aVar2.getContent() : null);
            return sb2.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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final String f48755s;

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

        @Override
        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.f48755s;
        }
    }

    @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 C1242d extends p implements ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<hs.a> f48756s;

        public C1242d(f0<hs.a> f0Var) {
            super(0);
            this.f48756s = f0Var;
        }

        @Override
        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.f48756s.f57653a;
        }
    }

    @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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public e() {
            super(0);
        }

        @Override
        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:" + d.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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<String> f48758s;

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

        @Override
        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:" + this.f48758s.f57653a;
        }
    }

    @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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<String> f48759s;

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

        @Override
        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:" + this.f48759s.f57653a;
        }
    }

    @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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<String> f48760s;

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

        @Override
        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:" + this.f48760s.f57653a;
        }
    }

    @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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public i() {
            super(0);
        }

        @Override
        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 "临时放行响应数据:" + d.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 ah0.a<Object> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public final f0<wu.d> f48762s;

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

        @Override
        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.f48762s.f57653a;
        }
    }

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

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

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

    public final hs.a 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();
        hs.a aVar = this.shortPassProtoRes;
        n.f(aVar);
        i(jSONObject, WfConstant.EVENT_KEY_FAIL_CODE, Integer.valueOf(aVar.getStatusCode()));
        hs.a aVar2 = this.shortPassProtoRes;
        n.f(aVar2);
        i(jSONObject, "content", aVar2.getContent());
        i(jSONObject, "redirectUrl", this.redirectUrl);
        i(jSONObject, ZZ00Z.A, 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 hs.a g(String url) {
        wu.d o11;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{url}, this, changeQuickRedirect, false, 6669, new Class[]{String.class}, hs.a.class);
        if (proxy.isSupported) {
            return (hs.a) proxy.result;
        }
        if (TextUtils.isEmpty(url)) {
            return null;
        }
        String uri = a(Uri.parse(url).buildUpon()).build().toString();
        int i11 = 0;
        while (true) {
            if (i11 > 0) {
                try {
                    Thread.sleep((long) (BuildConstants.TYPE_STEP * Math.pow(2.0d, i11)));
                } catch (Exception e11) {
                    e11.printStackTrace();
                }
            }
            o11 = wu.b.o(uri, wu.b.c(this.network));
            i11++;
            if (i11 >= 3 || (o11 != null && o11.getCom.zm.adxsdk.protocol.api.interfaces.WfConstant.EVENT_KEY_FAIL_CODE java.lang.String() >= 10)) {
                break;
            }
        }
        return hs.a.INSTANCE.a(o11);
    }

    public final boolean h(String result) {
        JSONObject b11;
        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 || (b11 = zs.a.b(result)) == null) {
            return false;
        }
        int optInt = b11.optInt(WfConstant.EVENT_KEY_FAIL_CODE);
        String optString = b11.optString("content");
        this.mac = b11.optString(ZZ00Z.A);
        this.portalType = b11.optString("portalType");
        this.portalVendor = b11.optString("portalVendor");
        this.fatApUrl = b11.optString("fatApUrl");
        this.shortPassProtoRes = new hs.a(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, hs.a res) {
        if (PatchProxy.proxy(new Object[]{new Integer(code), res}, this, changeQuickRedirect, false, 6674, new Class[]{Integer.TYPE, hs.a.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);
        hs.a g11 = g(fatApUrl);
        BdScoAuthFatApUrlSucEvent bdScoAuthFatApUrlSucEvent = new BdScoAuthFatApUrlSucEvent();
        bdScoAuthFatApUrlSucEvent.m(this.portalVendor);
        a.Companion companion = hs.a.INSTANCE;
        bdScoAuthFatApUrlSucEvent.l(Boolean.valueOf(n.d(companion.i(g11, companion.b()), "100")));
        bdScoAuthFatApUrlSucEvent.k(companion.i(g11, 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 a11;
        if (PatchProxy.proxy(new Object[]{event}, this, changeQuickRedirect, false, 6676, new Class[]{BdScoCommonParams.class}, Void.TYPE).isSupported || (a11 = qu.h.a()) == null) {
            return;
        }
        t2 t2Var = new t2(null, null, null, null, null, null, null, null, null, false, AnalyticsListener.EVENT_DRM_KEYS_LOADED, null);
        t2Var.t(this.param.getWifiId());
        t2Var.k(this.param.getApType());
        t2Var.l(Integer.valueOf(this.param.getAuthType()));
        t2Var.s(this.param.getUuid());
        event.e(this.mac);
        e0 e0Var = e0.f58580a;
        a11.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.f57653a = p();
        h4.l().y("WIFI_AUTH|connect", new b(f0Var2));
        a.Companion companion = hs.a.INSTANCE;
        if (companion.h((hs.a) f0Var2.f57653a)) {
            T t11 = f0Var2.f57653a;
            n.f(t11);
            String a11 = is.a.a(((hs.a) t11).getContent());
            h4.l().y("WIFI_AUTH|connect", new c(a11));
            if (TextUtils.isEmpty(a11)) {
                j(21, (hs.a) f0Var2.f57653a);
                return 21;
            }
            f0Var2.f57653a = g(a11);
            h4.l().y("WIFI_AUTH|connect", new C1242d(f0Var2));
            if (companion.h((hs.a) f0Var2.f57653a)) {
                this.shortPassProtoRes = (hs.a) f0Var2.f57653a;
                h4.l().y("WIFI_AUTH|connect", new e());
                return o(a11);
            }
        }
        if (companion.g((hs.a) f0Var2.f57653a)) {
            T t12 = f0Var2.f57653a;
            n.f(t12);
            f0Var.f57653a = ((hs.a) t12).getContent();
        }
        h4.l().y("WIFI_AUTH|connect", new f(f0Var));
        if (TextUtils.isEmpty((CharSequence) f0Var.f57653a)) {
            j(20, (hs.a) f0Var2.f57653a);
            return 20;
        }
        if (this.canceled) {
            j(10, (hs.a) f0Var2.f57653a);
            return 10;
        }
        String str = (String) f0Var.f57653a;
        if (str != null) {
            v0 b11 = w0.b(g1.a(f2.d()));
            m wifiId = param.getWifiId();
            if ((b11.y0(wifiId != null ? wifiId.getSsid() : null) || param.getIsGuoTie() == 1) && ((queryParameterNames = Uri.parse(t.F(str, "#", "%23", false, 4, null)).getQueryParameterNames()) == null || queryParameterNames.isEmpty())) {
                h4.l().y("WIFI_AUTH|connect", new g(f0Var));
                hs.a g11 = g((String) f0Var.f57653a);
                f0Var.f57653a = g11 != null ? g11.getContent() : 0;
                h4.l().y("WIFI_AUTH|connect", new h(f0Var));
            }
        }
        this.shortPassProtoRes = g((String) f0Var.f57653a);
        this.redirectUrl = (String) f0Var.f57653a;
        h4.l().y("WIFI_AUTH|connect", new i());
        return o((String) f0Var.f57653a);
    }

    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();
        }
        a.Companion companion = hs.a.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;
            }
            hs.a aVar = this.shortPassProtoRes;
            n.f(aVar);
            this.mac = aVar.h("client_mac");
            hs.a aVar2 = this.shortPassProtoRes;
            n.f(aVar2);
            this.portalType = aVar2.h(companion.c());
            hs.a aVar3 = this.shortPassProtoRes;
            n.f(aVar3);
            this.portalVendor = aVar3.h(companion.d());
            hs.a aVar4 = this.shortPassProtoRes;
            n.f(aVar4);
            this.fatApUrl = aVar4.h(companion.e());
            hs.a aVar5 = this.shortPassProtoRes;
            n.f(aVar5);
            if (!TextUtils.equals(ZZ00Z.f40462g, aVar5.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 hs.a p() {
        T t11;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 6671, new Class[0], hs.a.class);
        if (proxy.isSupported) {
            return (hs.a) proxy.result;
        }
        f0 f0Var = new f0();
        int i11 = 0;
        while (true) {
            if (i11 > 0) {
                try {
                    Thread.sleep((long) (BuildConstants.TYPE_STEP * Math.pow(2.0d, i11)));
                } catch (Exception e11) {
                    e11.printStackTrace();
                }
            }
            f0Var.f57653a = 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));
            i11++;
            if (i11 >= 3 || ((t11 = f0Var.f57653a) != 0 && ((wu.d) t11).getCom.zm.adxsdk.protocol.api.interfaces.WfConstant.EVENT_KEY_FAIL_CODE java.lang.String() >= 10)) {
                break;
            }
        }
        return hs.a.INSTANCE.a((wu.d) f0Var.f57653a);
    }
}