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

import android.graphics.Point;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout.LayoutParams;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.plugin.voip.video.MovableTextureView;
import com.tencent.mm.sdk.platformtools.ab;

class VoipVideoFragment$5 implements OnClickListener {
    final /* synthetic */ VoipVideoFragment sYn;

    VoipVideoFragment$5(VoipVideoFragment voipVideoFragment) {
        this.sYn = voipVideoFragment;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(4874);
        ab.i("MicroMsg.Voip.VoipVideoFragment", "steve: hwTxtureViewSmall clicked!");
        if (VoipVideoFragment.i(this.sYn)) {
            boolean z;
            VoipVideoFragment.c(this.sYn, !VoipVideoFragment.l(this.sYn));
            VoipVideoFragment voipVideoFragment = this.sYn;
            if (VoipVideoFragment.l(this.sYn)) {
                z = false;
            } else {
                z = true;
            }
            Point d = VoipVideoFragment.d(voipVideoFragment, z);
            MovableTextureView movableTextureView = (MovableTextureView) this.sYn.sXQ;
            int i = d.x;
            int i2 = d.y;
            LayoutParams layoutParams = (LayoutParams) movableTextureView.getLayoutParams();
            LayoutParams layoutParams2 = new LayoutParams(i, i2);
            layoutParams2.leftMargin = layoutParams.leftMargin;
            layoutParams2.topMargin = layoutParams.topMargin;
            movableTextureView.mWidth = i;
            movableTextureView.sZX = i2;
            movableTextureView.setLayoutParams(layoutParams2);
            this.sYn.sXQ.setVisibility(4);
            VoipVideoFragment.q(this.sYn);
            this.sYn.sXP.setVisibility(0);
            VoipVideoFragment.m(this.sYn).setVisibility(0);
            ab.i("MicroMsg.Voip.VoipVideoFragment", "steve: change to big hw texture view!");
            LayoutParams layoutParams3 = new LayoutParams(-1, -2);
            layoutParams3.addRule(13);
            int indexOfChild = this.sYn.sWp.indexOfChild(VoipVideoFragment.n(this.sYn));
            this.sYn.sWp.removeView(this.sYn.sXQ);
            this.sYn.sWp.addView(this.sYn.sXP, indexOfChild + 1, layoutParams3);
            ((c) this.sYn.sVY.get()).b(this.sYn.sXP);
            VoipVideoFragment.a(this.sYn, false);
            h.pYm.e(11079, new Object[]{Integer.valueOf(3)});
        }
        AppMethodBeat.o(4874);
    }
}
