package com.tencent.mm.plugin.freewifi.ui;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.freewifi.a.a.a;
import com.tencent.mm.plugin.freewifi.m;
import com.tencent.mm.plugin.freewifi.model.d;
import com.tencent.mm.plugin.freewifi.ui.ProtocolThreeTwoUI.10;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.smtt.sdk.TbsMediaPlayer$TbsMediaPlayerListener;
import java.net.HttpURLConnection;

class ProtocolThreeTwoUI$10$1 implements a {
    final /* synthetic */ 10 mAH;

    ProtocolThreeTwoUI$10$1(10 10) {
        this.mAH = 10;
    }

    public final void g(HttpURLConnection httpURLConnection) {
        AppMethodBeat.i(21190);
        int responseCode = httpURLConnection.getResponseCode();
        ab.i("MicroMsg.FreeWifi.Protocol32UI", "sessionKey=%s, step=%d, method=Protocol32UI.HttpAuthentication.onSuccess, desc=it receives http response for authentication. http response status code=%d", new Object[]{m.V(this.mAH.mAD.getIntent()), Integer.valueOf(m.W(this.mAH.mAD.getIntent())), Integer.valueOf(responseCode)});
        if (responseCode == 200) {
            ProtocolThreeTwoUI.f(this.mAH.mAD);
            AppMethodBeat.o(21190);
        } else if (responseCode == 302) {
            ProtocolThreeTwoUI.b(this.mAH.mAD, httpURLConnection.getHeaderField("Location"));
            AppMethodBeat.o(21190);
        } else {
            ab.i("MicroMsg.FreeWifi.Protocol32UI", "sessionKey=%s, step=%d, method=Protocol32UI.httpAuthentication, desc=http response status code is neither 200 nor 302, so it fs to connect wifi. ", new Object[]{m.V(this.mAH.mAD.getIntent()), Integer.valueOf(m.W(this.mAH.mAD.getIntent()))});
            d.a(this.mAH.mAD.ssid, 3, this.mAH.mAD.getIntent());
            ProtocolThreeTwoUI.a(this.mAH.mAD, 32, "INVALID_HTTP_RESP_CODE");
            AppMethodBeat.o(21190);
        }
    }

    public final void j(Exception exception) {
        AppMethodBeat.i(21191);
        ab.i("MicroMsg.FreeWifi.Protocol32UI", "sessionKey=%s, step=%d, method=Protocol32UI.httpAuthentication, desc=exception happens during http, so it fails to connect wifi. e.getMessage()=%s", new Object[]{m.V(this.mAH.mAD.getIntent()), Integer.valueOf(m.W(this.mAH.mAD.getIntent())), exception.getMessage()});
        d.a(this.mAH.mAD.ssid, 3, this.mAH.mAD.getIntent());
        ProtocolThreeTwoUI.a(this.mAH.mAD, TbsMediaPlayer$TbsMediaPlayerListener.MEDIA_EXTRA_SUBTITLE_COUNT, m.g(exception));
        AppMethodBeat.o(21191);
    }
}
