package com.tencent.mm.plugin.account.bind.ui;

import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.account.friend.a.l;
import com.tencent.mm.plugin.account.friend.a.l.a;
import com.tencent.mm.ui.MMWizardActivity;
import com.tencent.ytcommon.BuildConfig;

public class BindMContactStatusUI extends MMWizardActivity {
    private TextView grA;
    private TextView grB;
    private Button grC;
    private ImageView gri;

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

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(13455);
        super.onCreate(bundle);
        setMMTitle(2131297565);
        initView();
        AppMethodBeat.o(13455);
    }

    public final int getLayoutId() {
        return 2130968843;
    }

    public final void initView() {
        AppMethodBeat.i(13456);
        this.gri = (ImageView) findViewById(2131821737);
        this.grA = (TextView) findViewById(2131821738);
        this.grB = (TextView) findViewById(2131821768);
        this.grC = (Button) findViewById(2131821740);
        if (l.apS() == a.gvz) {
            this.gri.setImageResource(2131231608);
            String str = (String) g.RP().Ry().get(6, null);
            if (str == null || str.equals(BuildConfig.FLAVOR)) {
                str = (String) g.RP().Ry().get(4097, null);
            }
            this.grB.setText(getString(2131297561));
            this.grA.setText(getString(2131297586, new Object[]{str}));
        } else {
            this.gri.setImageResource(2131231609);
            this.grB.setText(2131297573);
            this.grA.setText(2131297573);
            this.grB.setVisibility(8);
        }
        this.grC.setOnClickListener(new 1(this));
        AppMethodBeat.o(13456);
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        AppMethodBeat.i(13457);
        if (i == 4) {
            Ni(1);
            AppMethodBeat.o(13457);
            return true;
        }
        boolean onKeyDown = super.onKeyDown(i, keyEvent);
        AppMethodBeat.o(13457);
        return onKeyDown;
    }

    static /* synthetic */ void a(BindMContactStatusUI bindMContactStatusUI) {
        AppMethodBeat.i(13458);
        bindMContactStatusUI.Ni(1);
        AppMethodBeat.o(13458);
    }
}
