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

import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.ay;
import com.tencent.mm.sdk.platformtools.bo;

class k$7 implements OnTouchListener {
    final /* synthetic */ k nNE;

    k$7(k kVar) {
        this.nNE = kVar;
    }

    public final boolean onTouch(View view, MotionEvent motionEvent) {
        AppMethodBeat.i(113537);
        switch (motionEvent.getAction()) {
            case 0:
                this.nNE.nNt = true;
                this.nNE.nNo.setVisibility(0);
                this.nNE.nNn.reset();
                VolumeMeter volumeMeter = this.nNE.nNn;
                if (!volumeMeter.nOg) {
                    volumeMeter.fAA = true;
                    volumeMeter.bKh();
                }
                this.nNE.nNm.setPressed(true);
                if (this.nNE.nNt) {
                    ay.a(ah.getContext(), 2131304021, new 1(this));
                    this.nNE.nNu = 1;
                    ab.i("MicroMsg.TalkMgr", "micBtn pressed down");
                    this.nNE.nNw = bo.yz();
                    this.nNE.nNA.akz();
                    this.nNE.bKa();
                    break;
                }
                break;
            case 1:
            case 3:
                this.nNE.nNm.setPressed(false);
                this.nNE.nNo.setVisibility(8);
                this.nNE.nNn.reset();
                this.nNE.nNn.fAA = false;
                if (this.nNE.nNt) {
                    this.nNE.nNt = false;
                    if (this.nNE.nNu == 5) {
                        ab.i("MicroMsg.TalkMgr", "cancel during seize-success prepare time");
                        this.nNE.nNx.stopTimer();
                        this.nNE.nNy.stopTimer();
                    }
                    this.nNE.nNu = 0;
                    this.nNE.nNC.stopTimer();
                    this.nNE.nNA.akA();
                    ay.au(ah.getContext(), 2131304024);
                    this.nNE.bKa();
                    if (this.nNE.nNB != null) {
                        this.nNE.nNB.bJW();
                        break;
                    }
                }
                break;
            case 2:
                if (this.nNE.nNt) {
                }
                break;
        }
        AppMethodBeat.o(113537);
        return false;
    }
}
