package com.tencent.mm.plugin.mmsight.segment.a;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ap.a;

class c$2 implements a {
    final /* synthetic */ c oAp;

    c$2(c cVar) {
        this.oAp = cVar;
    }

    public final boolean BI() {
        AppMethodBeat.i(3725);
        if (this.oAp.released) {
            AppMethodBeat.o(3725);
            return false;
        }
        try {
            if (this.oAp.isPlaying()) {
                int currentPosition = this.oAp.getCurrentPosition();
                if (this.oAp.ozL != null) {
                    this.oAp.ozL.yY(currentPosition);
                }
                ab.d("MicroMsg.SectionRepeatMediaPlayer", "position[%d] repeat[%d, %d] duration[%d]", new Object[]{Integer.valueOf(currentPosition), Integer.valueOf(this.oAp.oAd), Integer.valueOf(this.oAp.oAe), Integer.valueOf(this.oAp.getDuration())});
                if (currentPosition < this.oAp.oAe) {
                    AppMethodBeat.o(3725);
                    return true;
                }
                ab.i("MicroMsg.SectionRepeatMediaPlayer", "reach repeat end time, seek to %s", new Object[]{Integer.valueOf(this.oAp.oAe)});
                this.oAp.seekTo(this.oAp.oAd);
                AppMethodBeat.o(3725);
                return false;
            }
            AppMethodBeat.o(3725);
            return true;
        } catch (IllegalStateException e) {
            ab.e("MicroMsg.SectionRepeatMediaPlayer", "MediaPlayer may be released. %s", new Object[]{e.getMessage()});
            if (this.oAp.released) {
                AppMethodBeat.o(3725);
                return false;
            }
            AppMethodBeat.o(3725);
            return true;
        }
    }
}
