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

import android.os.Bundle;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.model.aw;
import com.tencent.mm.model.c;
import com.tencent.mm.pluginsdk.ui.applet.CdnImageView;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.storage.ac;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.a;
import com.tencent.ytcommon.BuildConfig;

@a(3)
public class IPCallAcitivityUI extends MMActivity {
    private FrameLayout nAo;
    private TextView nAp;
    private TextView nAq;
    private Button nAr;
    private CdnImageView nAs;
    private boolean nAt = false;
    private com.tencent.mm.plugin.ipcall.a.g.a nAu;

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

    public final int getForceOrientation() {
        return 1;
    }

    public final int getLayoutId() {
        return 2130969892;
    }

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(21989);
        super.onCreate(bundle);
        getWindow().addFlags(131072);
        getWindow().setFlags(1024, 1024);
        this.mController.hideTitleView();
        initView();
        AppMethodBeat.o(21989);
    }

    public void onDestroy() {
        AppMethodBeat.i(21990);
        super.onDestroy();
        AppMethodBeat.o(21990);
    }

    public final void initView() {
        AppMethodBeat.i(21991);
        this.nAo = (FrameLayout) findViewById(2131825113);
        this.nAp = (TextView) findViewById(2131825115);
        this.nAq = (TextView) findViewById(2131825117);
        this.nAr = (Button) findViewById(2131825119);
        this.nAs = (CdnImageView) findViewById(2131825118);
        ard();
        this.nAo.setOnClickListener(new 1(this));
        this.nAr.setOnClickListener(new 2(this));
        setBackBtn(new 3(this));
        AppMethodBeat.o(21991);
    }

    private void ard() {
        AppMethodBeat.i(21992);
        aw.ZK();
        String str = (String) c.Ry().get(ac.a.xLS, BuildConfig.FLAVOR);
        if (bo.isNullOrNil(str)) {
            ab.e("MicroMsg.IPCallAcitivityUI", "xml is empty");
            finish();
            AppMethodBeat.o(21992);
            return;
        }
        this.nAu = com.tencent.mm.plugin.ipcall.a.g.a.OO(str);
        if (this.nAu == null) {
            ab.e("MicroMsg.IPCallAcitivityUI", "mMsgInfo is null");
            finish();
            AppMethodBeat.o(21992);
            return;
        }
        this.nAp.setText(this.nAu.Title);
        this.nAq.setText(this.nAu.Desc);
        this.nAr.setText(this.nAu.nzv);
        this.nAs.setUrl(this.nAu.ImgUrl);
        AppMethodBeat.o(21992);
    }

    public void finish() {
        AppMethodBeat.i(21993);
        super.finish();
        overridePendingTransition(2131034130, 2131034221);
        if (this.nAt) {
            com.tencent.mm.plugin.ipcall.a.e.c.xl(1);
            AppMethodBeat.o(21993);
            return;
        }
        com.tencent.mm.plugin.ipcall.a.e.c.xl(0);
        AppMethodBeat.o(21993);
    }

    public void onBackPressed() {
        AppMethodBeat.i(21994);
        super.onBackPressed();
        AppMethodBeat.o(21994);
    }
}
