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

import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ipcinvoker.h.b;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.plugin.voip.model.VoipScoreState;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.a;
import com.tencent.mm.ui.widget.a.c;
import com.tencent.mm.ui.widget.a.e;

@a(3)
public class VoipScoreDialog extends MMActivity {
    private VoipScoreState sPB;
    private ViewGroup sWL;
    private ImageView[] sWM = new ImageView[5];
    private c sWN = null;
    private int sWO = 0;

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

    public VoipScoreDialog() {
        AppMethodBeat.i(4862);
        AppMethodBeat.o(4862);
    }

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(4863);
        super.onCreate(bundle);
        this.sPB = (VoipScoreState) getIntent().getParcelableExtra("key_score_state");
        if (this.sPB == null) {
            b.e("MicroMsg.VoipScoreDialog", "onCreate error, scoreState is null", new Object[0]);
            finish();
            AppMethodBeat.o(4863);
            return;
        }
        this.sWL = (ViewGroup) View.inflate(this, 2130971031, null);
        this.sWM[0] = (ImageView) this.sWL.findViewById(2131828505);
        this.sWM[1] = (ImageView) this.sWL.findViewById(2131828506);
        this.sWM[2] = (ImageView) this.sWL.findViewById(2131828507);
        this.sWM[3] = (ImageView) this.sWL.findViewById(2131828508);
        this.sWM[4] = (ImageView) this.sWL.findViewById(2131828509);
        for (int i = 0; i < this.sWM.length; i++) {
            this.sWM[i].setOnClickListener(new 1(this, i));
        }
        e.a aVar = new e.a(this);
        aVar.al(this.sPB.sSM);
        aVar.fo(this.sWL);
        aVar.zQJ = getString(2131304462);
        aVar.b(new 2(this));
        aVar.re(false);
        aVar.b(new 3(this));
        this.sWN = aVar.gud;
        if (this.sWN != null) {
            this.sWN.show();
            AppMethodBeat.o(4863);
            return;
        }
        finish();
        AppMethodBeat.o(4863);
    }

    public final int getLayoutId() {
        return 2130971032;
    }

    static /* synthetic */ void a(VoipScoreDialog voipScoreDialog, int i) {
        int i2 = 0;
        AppMethodBeat.i(4864);
        b.i("MicroMsg.VoipScoreDialog", "onScoreViewClick %s", new Object[]{Integer.valueOf(i)});
        if (i >= 0 && i < voipScoreDialog.sWM.length) {
            while (i2 <= i) {
                voipScoreDialog.sWM[i2].setImageResource(2130840630);
                i2++;
            }
            for (i2 = i + 1; i2 < voipScoreDialog.sWM.length; i2++) {
                voipScoreDialog.sWM[i2].setImageResource(2130840629);
            }
            voipScoreDialog.sWO = i + 1;
        }
        if (voipScoreDialog.sWN != null) {
            voipScoreDialog.sWN.a(2131304463, new 4(voipScoreDialog));
            voipScoreDialog.sWN.b(2131296868, new 5(voipScoreDialog));
        }
        AppMethodBeat.o(4864);
    }

    static /* synthetic */ void b(VoipScoreDialog voipScoreDialog, int i) {
        AppMethodBeat.i(4865);
        b.i("MicroMsg.VoipScoreDialog", "doScoreStat %s %s %s", new Object[]{Integer.valueOf(voipScoreDialog.sWO), Integer.valueOf(i), voipScoreDialog.sPB});
        h.pYm.e(15684, new Object[]{Integer.valueOf(voipScoreDialog.sPB.nwu), Long.valueOf(voipScoreDialog.sPB.nwv), Integer.valueOf(i), Integer.valueOf(voipScoreDialog.sWO), Integer.valueOf(voipScoreDialog.sPB.sSN), Long.valueOf(voipScoreDialog.sPB.sSO), Long.valueOf(voipScoreDialog.sPB.nxT)});
        AppMethodBeat.o(4865);
    }
}
