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

import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.freewifi.g;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.p;

public class FreeWifiPcUI extends MMActivity {
    private String appId;
    private String cxb;
    private Button grC;
    private String mwH;
    private Button myU;
    private TextView mzS;
    private int mzT;
    private p mzU = null;
    private String mza;

    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.at(this, z);
    }

    static /* synthetic */ void a(FreeWifiPcUI freeWifiPcUI) {
        AppMethodBeat.i(21069);
        freeWifiPcUI.goBack();
        AppMethodBeat.o(21069);
    }

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(21066);
        super.onCreate(bundle);
        setMMTitle(2131300078);
        setBackBtn(new 1(this));
        this.appId = getIntent().getStringExtra("free_wifi_appid");
        this.mzT = getIntent().getIntExtra("ConstantsFreeWifi.FREE_WIFI_PC_ENCRYPTED_SHOPID", 0);
        this.cxb = getIntent().getStringExtra("ConstantsFreeWifi.FREE_WIFI_PC_TICKET");
        this.mwH = getIntent().getStringExtra("free_wifi_app_nickname");
        this.mza = getIntent().getStringExtra("free_wifi_privacy_url");
        this.mzS = (TextView) findViewById(2131824150);
        this.grC = (Button) findViewById(2131824151);
        this.mzS.setText("由" + this.mwH + "提供");
        this.grC.setOnClickListener(new 2(this));
        this.myU = (Button) findViewById(2131824152);
        this.myU.setOnClickListener(new 3(this));
        AppMethodBeat.o(21066);
    }

    public final int getForceOrientation() {
        return 1;
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        AppMethodBeat.i(21067);
        if (i == 4 && keyEvent.getRepeatCount() == 0) {
            goBack();
            AppMethodBeat.o(21067);
            return true;
        }
        boolean onKeyDown = super.onKeyDown(i, keyEvent);
        AppMethodBeat.o(21067);
        return onKeyDown;
    }

    private void goBack() {
        AppMethodBeat.i(21068);
        g.gkE.h(new Intent(), this);
        finish();
        AppMethodBeat.o(21068);
    }

    public final int getLayoutId() {
        return 2130969596;
    }

    static /* synthetic */ void a(FreeWifiPcUI freeWifiPcUI, String str, String str2) {
        AppMethodBeat.i(21070);
        Intent intent = new Intent();
        intent.putExtra("free_wifi_error_ui_error_msg", str);
        intent.putExtra("free_wifi_error_ui_error_msg_detail1", str2);
        intent.setClass(freeWifiPcUI, FreeWifiErrorUI.class);
        freeWifiPcUI.finish();
        freeWifiPcUI.startActivity(intent);
        AppMethodBeat.o(21070);
    }
}
